Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 29 additions & 19 deletions packages/cli/generators/example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,43 @@ const fs = require('fs-extra');
const g = require('../../lib/globalize');

const EXAMPLES = {
todo: 'Tutorial example on how to build an application with LoopBack 4.',
'todo-list':
todo: g.f('Tutorial example on how to build an application with LoopBack 4.'),
'todo-list': g.f(
'Continuation of the todo example using relations in LoopBack 4.',
'hello-world': 'A simple hello-world application using LoopBack 4.',
'log-extension': 'An example extension project for LoopBack 4.',
'rpc-server': 'A basic RPC server using a made-up protocol.',
'soap-calculator': 'An example on how to integrate SOAP web services.',
'express-composition':
),
'hello-world': g.f('A simple hello-world application using LoopBack 4.'),
'log-extension': g.f('An example extension project for LoopBack 4.'),
'rpc-server': g.f('A basic RPC server using a made-up protocol.'),
'soap-calculator': g.f('An example on how to integrate SOAP web services.'),
'express-composition': g.f(
'A simple Express application that uses LoopBack 4 REST API.',
context: 'Standalone examples showing how to use @loopback/context.',
'greeter-extension':
),
context: g.f('Standalone examples showing how to use @loopback/context.'),
'greeter-extension': g.f(
'An example showing how to implement the extension point/extension pattern.',
'greeting-app':
),
'greeting-app': g.f(
'An example showing how to compose an application from component and ' +
'controllers, interceptors, and observers.',
'lb3-application':
'controllers, interceptors, and observers.',
),
'lb3-application': g.f(
'An example LoopBack 3 application mounted in a LoopBack 4 project.',
'rest-crud':
),
'rest-crud': g.f(
'A simplified version of the Todo example that only requires a model and ' +
'a datasource.',
'file-transfer':
'a datasource.',
),
'file-transfer': g.f(
'An example showing how to expose APIs to upload/download files.',
'access-control-migration':
),
'access-control-migration': g.f(
'An access control example migrated from the LoopBack 3 repository ' +
'loopback-example-access-control.',
'metrics-prometheus': 'An example illustrating metrics using Prometheus.',
'validation-app': 'An example demonstrating how to add validations.',
'loopback-example-access-control.',
),
'metrics-prometheus': g.f(
'An example illustrating metrics using Prometheus.',
),
'validation-app': g.f('An example demonstrating how to add validations.'),
};
Object.freeze(EXAMPLES);

Expand Down
16 changes: 16 additions & 0 deletions packages/cli/intl/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"0115c9a527e1f9f5a354bbccdfe36112": "Project root directory:",
"012baa262729b0782646db9528429b4c": "Please select the repository base class",
"0258f65fb9328a8b055704469bebd5f9": "Please specify the base path",
"02d863aa78876b4a4dfce688a7e6f917": "An example demonstrating how to add validations.",
"0609b5861fff6ee8047b75494e76af9e": "What is the base HTTP path name of the CRUD operations?",
"07ca1f30e0f0c91e5866d7c230c49157": "An example illustrating metrics using Prometheus.",
"08a89a8f18d86a3e2f5ce66aeb8b183f": "Description for the {0}",
"0e2dd2688c9939e6e3bc58af3b5e7b17": "A valid repository base class",
"0eee394c1a8c898184aa039420afc594": "Name of the example to clone",
Expand All @@ -17,6 +19,8 @@
"1d8b3191def358326ca3c1f5d011c96e": "Promote anonymous schemas as models",
"22097832e90dd9481994416927ad1ecc": "Name for the {0}",
"2384e2eb575c2a7377a3de641b7556e3": "Select controllers to be generated:",
"23fe9f126c159af41d59b9b16b594c05": "A basic RPC server using a made-up protocol.",
"2680da6ffe85172d7053e97f8e21d1ff": "A simple hello-world application using LoopBack 4.",
"2d3e0ddbc158e249765cb0bb8f544217": "Format generated code using npm run lint:fix",
"2d5745f8e3d91cf55dcc84f354a43e6c": "Allow <sourceModel> queries to include data from related <destinationModel>",
"3190bfdf06a7237a3593ef7291031507": "A valid based model",
Expand All @@ -28,10 +32,12 @@
"3e7a1e0430f90996d14c5065c281fdcf": "Is it a global interceptor?",
"407fbe4b3fc192f22b4e90442c5980a1": "Select the models which to discover",
"40cf3ed09f01e543265ffe4519bd08a5": "Project name for the {0}",
"44d2743e9d8e6106410b7fea1fcb69a0": "An example extension project for LoopBack 4.",
"4670d311aa36fb13d626ec4ab55d4f19": "Next steps:",
"48b75482f8e08e012b70a495df71d514": "Mark the project private (excluded from npm publish)",
"4b1516463cdea3b248eeb97ac4948198": "Allow additional (free-form) properties?",
"4d8a9b728bee844a0a6647379ab86826": "Let's add a property to {0}",
"5225c88650d6a337fb4c215cca812f96": "An access control example migrated from the LoopBack 3 repository loopback-example-access-control.",
"5226c72e763d99e9a316a9ce9875fde9": "Include Dockerfile and .dockerignore",
"52e1f166e76bb9545daf180fb2e63782": "Please select the relation type",
"536024b4c8926c72705ad6796e7629b6": "Boolean to discover views",
Expand Down Expand Up @@ -73,7 +79,9 @@
"86e3245551645cc680371ba55857f172": "If discovering a model from a dataSource, specify the name of its table/view",
"87252b6b2ca8b638846fae8825f47ccc": "Is {0} generated automatically?",
"8727d7fdfe60608d53d81f7699671a74": "Please enter the name of the ID property for {0}:",
"87301db76b14083e67a5092c1bd04cd0": "An example LoopBack 3 application mounted in a LoopBack 4 project.",
"8ae4fe9c6f4bbdbe961a3e0f7fc88bfc": "Please select the datasource",
"8b4796b628fbc387d54d2d6857336613": "An example showing how to expose APIs to upload/download files.",
"919886be4ae469dbab529c61acd85781": "Enter the connector's package name:",
"91cd2d832c4b723add34ca2db743b689": "Foreign key name to define on the target model",
"93a678d3a0375c0d3b52c7d8e938e019": "Generation is aborted: {0}",
Expand All @@ -89,9 +97,11 @@
"a261957414bba63a85459b733f597acb": "Application class name",
"a4577a939c79c9d229d545d109fd60fa": "No 'lint:fix' script is configured in package.json.",
"a47ec64e233351cf9f742a03f351c3d1": "Global interceptors are sorted by the order of an array of group names bound to ContextBindings.GLOBAL_INTERCEPTOR_ORDERED_GROUPS. See https://loopback.io/doc/en/lb4/Interceptors.html#order-of-invocation-for-interceptors.",
"a6493241c36ba3efc3d6a14ddcf87685": "Standalone examples showing how to use @loopback/context.",
"a7f90f78abfa210e6d490268ea98ea80": "A valid model name",
"a8dbe656477e8eab5c8763a9b1ff0f84": "Select models to import:",
"aa2ea1f299d456d85ba42aab96581fe5": "Exclude files that match the pattern",
"ac0a68d90df6320ff454590a5732e748": "An example showing how to implement the extension point/extension pattern.",
"ad5df45eb6b1da34ba7f75bec5b6a3d5": "Flag to indicate a global interceptor",
"aebb8636dacf73a5ea8811fafbe3ed68": "Property type:",
"afdaa0dc3b913a7b3bd5f20489f5c76d": "A valid base path",
Expand All @@ -100,6 +110,8 @@
"b3c1afbfb1c87daaac414bab981ee7bd": "Error reading file",
"b68ecbcaa4f94151658f5ad32e6cf6fd": "Local service class bound to application context",
"b9356b7d2debc8b04dd6f2fd9bf5f83f": "What example would you like to clone?",
"bcebec8d7974acc21a208c7325a06e9c": "A simplified version of the Todo example that only requires a model and a datasource.",
"be65fa55f75dd126a2af5ec2ad4b8f8b": "An example on how to integrate SOAP web services.",
"be687f67487ae57f311148f55cc2df76": "Foreign key name to define on the source model",
"bfd42878b3c50994368322098aed9e42": "include Dockerfile and .dockerignore",
"c0c9631ff3d1d1ad49a123b03328fe9c": "URL or file path of the OpenAPI spec",
Expand All @@ -121,16 +133,20 @@
"d75571079943e2a3696adfd8787ecc0f": "Select features to enable in the project",
"d8448d2597b2832ab43abba46a595c42": "What is the name of the model to use with this CRUD repository?",
"d963128609dd73445bd8b96b6a34eb68": "Type for the {0}",
"da3f136dd75297a4944bd013b8e166ee": "Continuation of the todo example using relations in LoopBack 4.",
"db8c853ec3ce3b65e1513d198a9bd2e9": "Enable mocha",
"ddb67f6cad9d36d2acf42898c4fe58f5": "Component name",
"e05247fa3388c64e6cc5ab608dd34346": "Validate the OpenAPI spec",
"e4765958ab33531b244d9d1d6fb2b705": "Target model primary key does not exist.",
"e4a87a58bb56e705349a97dbc23ecd6d": "Default relation name",
"e4ca073d5042621174cf6950ad25b40e": "Project description:",
"eaa7f2ab653690e3bfb202db78a00ff0": "A simple Express application that uses LoopBack 4 REST API.",
"ec0d3215aa6ad3aeae52f51dd7962879": "Service type - proxy, class or provider",
"ec5b5f03d997ee0da0157737a7b10d7b": "Source model",
"ed0e2f0329abfa07dba151a0b9e623c9": "An example showing how to compose an application from component and controllers, interceptors, and observers.",
"ed3bb197042a095ce19c1910d8d24226": "Enter the property name:",
"ee3b2cc023d839e3e31d346de7cce9e7": "Destination model",
"f2b5f8ac7197fb5916c3fa3e0986b535": "Tutorial example on how to build an application with LoopBack 4.",
"f32b47dfce5e7d0077f977a61665cc29": "Running 'npm run lint:fix' to format the code...",
"f5e20cc597e17deb35ef3ec4e55b707a": "Copyright owner:",
"f757c71fa54de6559c39e4e7f63a601c": "Please select target model",
Expand Down