@ldsg/cli 0.3.25 → 0.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rush/temp/package-deps_build.json +4 -2
- package/CHANGELOG.json +52 -0
- package/CHANGELOG.md +15 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/get-extend-app-data-params-using-npm-ldsg-module.js +0 -11
- package/dist/utils/get-extend-app-data-params-using-npm-ldsg-module.js.map +1 -1
- package/package.json +5 -5
- package/src/utils/get-extend-app-data-params-using-npm-ldsg-module.ts +0 -11
- package/dist/commands/fetch-app-data.d.ts +0 -2
- package/dist/commands/fetch-app-data.js +0 -40
- package/dist/commands/fetch-app-data.js.map +0 -1
- package/dist/commands/prepare-app-code.d.ts +0 -2
- package/dist/commands/prepare-app-code.js +0 -42
- package/dist/commands/prepare-app-code.js.map +0 -1
- package/dist/debug/constants.d.ts +0 -2
- package/dist/debug/constants.js +0 -10
- package/dist/debug/constants.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/utils/get-extend-app-data-params-using-npm-module.d.ts +0 -2
- package/dist/utils/get-extend-app-data-params-using-npm-module.js +0 -30
- package/dist/utils/get-extend-app-data-params-using-npm-module.js.map +0 -1
- package/dist/utils/get-extend-app-data-params-using-workspace-module/constants.d.ts +0 -1
- package/dist/utils/get-extend-app-data-params-using-workspace-module/constants.js +0 -9
- package/dist/utils/get-extend-app-data-params-using-workspace-module/constants.js.map +0 -1
- package/dist/utils/get-extend-app-data-params-using-workspace-module/index.d.ts +0 -2
- package/dist/utils/get-extend-app-data-params-using-workspace-module/index.js +0 -105
- package/dist/utils/get-extend-app-data-params-using-workspace-module/index.js.map +0 -1
- package/dist/utils/get-extend-app-data-params-using-workspace-module.d.ts +0 -2
- package/dist/utils/get-extend-app-data-params-using-workspace-module.js +0 -105
- package/dist/utils/get-extend-app-data-params-using-workspace-module.js.map +0 -1
|
@@ -18,17 +18,6 @@ const getExtendAppDataParamsUsingNpmLdsgModule = async (params) => {
|
|
|
18
18
|
filesInAppModele: [
|
|
19
19
|
...constants_1.FILES_IN_APP_TEMPLATE_MODULE,
|
|
20
20
|
packageJsonFile,
|
|
21
|
-
{
|
|
22
|
-
path: 'app.ts',
|
|
23
|
-
data: `import { createApp } from '@ldsg/create-app';
|
|
24
|
-
import MANIFEST_JSON from './manifest.json';
|
|
25
|
-
|
|
26
|
-
const { resourceRecords } = MANIFEST_JSON as any;
|
|
27
|
-
|
|
28
|
-
export const app = createApp({
|
|
29
|
-
resourceRecords,
|
|
30
|
-
});`
|
|
31
|
-
},
|
|
32
21
|
{
|
|
33
22
|
path: 'pnpm-workspace.yaml',
|
|
34
23
|
data: `packages:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-extend-app-data-params-using-npm-ldsg-module.js","sourceRoot":"","sources":["../../src/utils/get-extend-app-data-params-using-npm-ldsg-module.ts"],"names":[],"mappings":";;;;;;AAAA,+CAA+D;AAE/D,oDAAuB;AAGhB,MAAM,wCAAwC,GAA2B,KAAK,EAAE,MAAM,EAAE,EAAE;IAC/F,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAE3B,MAAM,eAAe,GAAG,wCAA4B,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC;IAKlG,gBAAC,CAAC,GAAG,CAAC,eAAe,EAAE,uCAAuC,EAAE,QAAQ,CAAC,CAAC;IAC1E,gBAAC,CAAC,GAAG,CAAC,eAAe,EAAE,+CAA+C,EAAE,QAAQ,CAAC,CAAC;IAElF,IAAI,GAAG,GAAwB;QAC7B,OAAO;QACP,YAAY,EAAE;YACZ,wBAAwB,EAAE,CAAC,SAAS,EAAE,oBAAoB,EAAE,gBAAgB,CAAC;YAC7E,gBAAgB,EAAE;gBAChB,GAAG,wCAA4B;gBAC/B,eAAe;gBACf;oBACE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"get-extend-app-data-params-using-npm-ldsg-module.js","sourceRoot":"","sources":["../../src/utils/get-extend-app-data-params-using-npm-ldsg-module.ts"],"names":[],"mappings":";;;;;;AAAA,+CAA+D;AAE/D,oDAAuB;AAGhB,MAAM,wCAAwC,GAA2B,KAAK,EAAE,MAAM,EAAE,EAAE;IAC/F,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAE3B,MAAM,eAAe,GAAG,wCAA4B,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC;IAKlG,gBAAC,CAAC,GAAG,CAAC,eAAe,EAAE,uCAAuC,EAAE,QAAQ,CAAC,CAAC;IAC1E,gBAAC,CAAC,GAAG,CAAC,eAAe,EAAE,+CAA+C,EAAE,QAAQ,CAAC,CAAC;IAElF,IAAI,GAAG,GAAwB;QAC7B,OAAO;QACP,YAAY,EAAE;YACZ,wBAAwB,EAAE,CAAC,SAAS,EAAE,oBAAoB,EAAE,gBAAgB,CAAC;YAC7E,gBAAgB,EAAE;gBAChB,GAAG,wCAA4B;gBAC/B,eAAe;gBACf;oBACE,IAAI,EAAE,qBAAqB;oBAC3B,IAAI,EAAE;iBACC;iBACR;aACF;SACF;KACF,CAAC;IAEF,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AA5BW,QAAA,wCAAwC,4CA4BnD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ldsg/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.27",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "ISC",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"commander": "^12.0.0",
|
|
15
15
|
"fs-extra": "^11.3.0",
|
|
16
16
|
"jsonata": "^2.0.6",
|
|
17
|
-
"@ldsg/
|
|
18
|
-
"@ldsg/
|
|
19
|
-
"@ldsg/
|
|
17
|
+
"@ldsg/utils": "0.3.27",
|
|
18
|
+
"@ldsg/apaas-to-runtime": "0.3.27",
|
|
19
|
+
"@ldsg/constants": "0.3.27"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/fs-extra": "^11.0.4",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"ts-node": "^10.9.2",
|
|
33
33
|
"tslib": "^2.8.1",
|
|
34
34
|
"typescript": "^5.3.3",
|
|
35
|
-
"@ldsg/types": "0.3.
|
|
35
|
+
"@ldsg/types": "0.3.27"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
@@ -21,17 +21,6 @@ export const getExtendAppDataParamsUsingNpmLdsgModule: GetExtendAppDataParams =
|
|
|
21
21
|
filesInAppModele: [
|
|
22
22
|
...FILES_IN_APP_TEMPLATE_MODULE,
|
|
23
23
|
packageJsonFile,
|
|
24
|
-
{
|
|
25
|
-
path: 'app.ts',
|
|
26
|
-
data: `import { createApp } from '@ldsg/create-app';
|
|
27
|
-
import MANIFEST_JSON from './manifest.json';
|
|
28
|
-
|
|
29
|
-
const { resourceRecords } = MANIFEST_JSON as any;
|
|
30
|
-
|
|
31
|
-
export const app = createApp({
|
|
32
|
-
resourceRecords,
|
|
33
|
-
});`
|
|
34
|
-
},
|
|
35
24
|
{
|
|
36
25
|
path: 'pnpm-workspace.yaml',
|
|
37
26
|
data: `packages:
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.fetchAppDataCommand = void 0;
|
|
7
|
-
const commander_1 = require("commander");
|
|
8
|
-
const apaas_to_runtime_1 = require("@ldsg/apaas-to-runtime");
|
|
9
|
-
const utils_1 = require("@ldsg/utils");
|
|
10
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
11
|
-
const path_1 = __importDefault(require("path"));
|
|
12
|
-
const constants_1 = require("../constants");
|
|
13
|
-
const action = async (options) => {
|
|
14
|
-
const appDataJsonPath = options.appDataJsonPath || constants_1.APP_DATA_JSON_PATH;
|
|
15
|
-
const { resourceRecords, sourceType } = await (0, utils_1.loadAppResourceRecords)({
|
|
16
|
-
appDataUri: options.appDataUri,
|
|
17
|
-
apaasAppDataUri: options.apaasAppDataUri,
|
|
18
|
-
apaasAppDataExpression: options.apaasAppDataExpression
|
|
19
|
-
});
|
|
20
|
-
let appData;
|
|
21
|
-
if (sourceType === 'apaas') {
|
|
22
|
-
const { targetResourceRecords } = (0, apaas_to_runtime_1.convertApaasResourceRecordsToResourceRecords)({
|
|
23
|
-
resourceRecords
|
|
24
|
-
});
|
|
25
|
-
appData = { resourceRecords: targetResourceRecords };
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
appData = { resourceRecords };
|
|
29
|
-
}
|
|
30
|
-
await fs_extra_1.default.ensureDir(path_1.default.dirname(appDataJsonPath));
|
|
31
|
-
await fs_extra_1.default.writeJson(appDataJsonPath, appData, { spaces: 2 });
|
|
32
|
-
};
|
|
33
|
-
exports.fetchAppDataCommand = new commander_1.Command('fetch-app-data')
|
|
34
|
-
.description('Fetch app data from runtime or aPaaS source')
|
|
35
|
-
.option('--app-data-uri <uri>', 'runtime app data URI')
|
|
36
|
-
.option('--apaas-app-data-uri <uri>', 'aPaaS app data URI (GraphQL)')
|
|
37
|
-
.option('--apaas-app-data-expression <expression>', 'JSONata expression for aPaaS data extraction')
|
|
38
|
-
.option('--app-data-json-path <path>', `output path for app data JSON (default: ${constants_1.APP_DATA_JSON_PATH})`)
|
|
39
|
-
.action(action);
|
|
40
|
-
//# sourceMappingURL=fetch-app-data.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"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M,CACL,6BAA6B,EAC7B,2CAA2C,8BAAkB,GAAG,CACjE;KACA,MAAM,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.prepareAppCodeCommand = void 0;
|
|
7
|
-
const commander_1 = require("commander");
|
|
8
|
-
const utils_1 = require("@ldsg/utils");
|
|
9
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
10
|
-
const constants_1 = require("../constants");
|
|
11
|
-
const get_extend_app_data_params_using_npm_module_1 = require("../utils/get-extend-app-data-params-using-npm-module");
|
|
12
|
-
const get_extend_app_data_params_using_workspace_module_1 = require("../utils/get-extend-app-data-params-using-workspace-module");
|
|
13
|
-
const action = async (options) => {
|
|
14
|
-
const usingWorkspaceModule = options.usingWorkspaceModule ?? false;
|
|
15
|
-
const appDataJsonPath = options.appDataJsonPath || constants_1.APP_DATA_JSON_PATH;
|
|
16
|
-
const appDirPath = options.appDirPath || constants_1.APP_DIR_PATH;
|
|
17
|
-
const appData = await fs_extra_1.default.readJson(appDataJsonPath);
|
|
18
|
-
let extendAppDataParams;
|
|
19
|
-
if (usingWorkspaceModule) {
|
|
20
|
-
extendAppDataParams = await (0, get_extend_app_data_params_using_workspace_module_1.getExtendAppDataParamsUsingWorkspaceModule)({ appData });
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
extendAppDataParams = await (0, get_extend_app_data_params_using_npm_module_1.getExtendAppDataParamsUsingNpmModule)({ appData });
|
|
24
|
-
}
|
|
25
|
-
const extendAppDataRes = (0, utils_1.extendAppData)(extendAppDataParams);
|
|
26
|
-
await (0, utils_1.prepare)({
|
|
27
|
-
...extendAppDataRes,
|
|
28
|
-
outputPath: appDirPath,
|
|
29
|
-
...(usingWorkspaceModule
|
|
30
|
-
? {
|
|
31
|
-
dependenciesVersionTemplate: constants_1.DEFAULT_USING_NPM_MODULE_DEPENDENCIES_VERSION_TEMPLATE
|
|
32
|
-
}
|
|
33
|
-
: {})
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
exports.prepareAppCodeCommand = new commander_1.Command('prepare-app-code')
|
|
37
|
-
.description('Prepare app code from fetched app data')
|
|
38
|
-
.option('--using-workspace-module', 'use workspace module mode')
|
|
39
|
-
.option('--app-data-json-path <path>', `path to app data JSON (default: ${constants_1.APP_DATA_JSON_PATH})`)
|
|
40
|
-
.option('--app-dir-path <path>', `output directory for prepared app code (default: ${constants_1.APP_DIR_PATH})`)
|
|
41
|
-
.action(action);
|
|
42
|
-
//# sourceMappingURL=prepare-app-code.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-app-code.js","sourceRoot":"","sources":["../../src/commands/prepare-app-code.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAoC;AACpC,uCAA0E;AAC1E,wDAA0B;AAC1B,4CAIsB;AACtB,sHAA4G;AAC5G,kIAAwH;AAExH,MAAM,MAAM,GAAG,KAAK,EAAE,OAA4B,EAAE,EAAE;IACpD,MAAM,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,IAAI,KAAK,CAAC;IACnE,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,IAAI,8BAAkB,CAAC;IACtE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,wBAAY,CAAC;IAEtD,MAAM,OAAO,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAEnD,IAAI,mBAAwC,CAAC;IAE7C,IAAI,oBAAoB,EAAE,CAAC;QACzB,mBAAmB,GAAG,MAAM,IAAA,8FAA0C,EAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;SAAM,CAAC;QACN,mBAAmB,GAAG,MAAM,IAAA,kFAAoC,EAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED,MAAM,gBAAgB,GAAG,IAAA,qBAAa,EAAC,mBAAmB,CAAC,CAAC;IAE5D,MAAM,IAAA,eAAO,EAAC;QACZ,GAAG,gBAAgB;QACnB,UAAU,EAAE,UAAU;QACtB,GAAG,CAAC,oBAAoB;YACtB,CAAC,CAAC;gBACE,2BAA2B,EAAE,kEAAsD;aACpF;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;AACL,CAAC,CAAC;AAEW,QAAA,qBAAqB,GAAG,IAAI,mBAAO,CAAC,kBAAkB,CAAC;KACjE,WAAW,CAAC,wCAAwC,CAAC;KACrD,MAAM,CAAC,0BAA0B,EAAE,2BAA2B,CAAC;KAC/D,MAAM,CACL,6BAA6B,EAC7B,mCAAmC,8BAAkB,GAAG,CACzD;KACA,MAAM,CAAC,uBAAuB,EAAE,oDAAoD,wBAAY,GAAG,CAAC;KACpG,MAAM,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/debug/constants.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.HANDLER_PACKAGE_JSON_PATH = exports.RUSH_JSON_PATH = void 0;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
exports.RUSH_JSON_PATH = path_1.default.join(process.cwd(), '../../rush.json');
|
|
9
|
-
exports.HANDLER_PACKAGE_JSON_PATH = path_1.default.join(process.cwd(), '../../libs/handler/package.json');
|
|
10
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/debug/constants.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAEX,QAAA,cAAc,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,iBAAiB,CAAC,CAAC;AAE7D,QAAA,yBAAyB,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,iCAAiC,CAAC,CAAC"}
|