@dittowords/cli 3.10.0 → 4.0.0-alpha.0
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/LICENSE +21 -0
- package/bin/add-project.js +101 -33
- package/bin/add-project.js.map +1 -1
- package/bin/api.js +49 -15
- package/bin/api.js.map +1 -1
- package/bin/component-folders.js +56 -7
- package/bin/component-folders.js.map +1 -1
- package/bin/config.js +204 -170
- package/bin/config.js.map +1 -1
- package/bin/config.test.js +92 -0
- package/bin/config.test.js.map +1 -0
- package/bin/consts.js +64 -18
- package/bin/consts.js.map +1 -1
- package/bin/ditto.js +250 -200
- package/bin/ditto.js.map +1 -1
- package/bin/generate-suggestions.js +155 -78
- package/bin/generate-suggestions.js.map +1 -1
- package/bin/generate-suggestions.test.js +189 -0
- package/bin/generate-suggestions.test.js.map +1 -0
- package/bin/http/fetchComponentFolders.js +60 -8
- package/bin/http/fetchComponentFolders.js.map +1 -1
- package/bin/http/fetchComponents.js +65 -18
- package/bin/http/fetchComponents.js.map +1 -1
- package/bin/http/fetchVariants.js +74 -14
- package/bin/http/fetchVariants.js.map +1 -1
- package/bin/http/importComponents.js +100 -49
- package/bin/http/importComponents.js.map +1 -1
- package/bin/importComponents.js +61 -10
- package/bin/importComponents.js.map +1 -1
- package/bin/init/init.js +120 -44
- package/bin/init/init.js.map +1 -1
- package/bin/init/project.js +160 -83
- package/bin/init/project.js.map +1 -1
- package/bin/init/project.test.js +49 -0
- package/bin/init/project.test.js.map +1 -0
- package/bin/init/token.js +134 -74
- package/bin/init/token.js.map +1 -1
- package/bin/init/token.test.js +69 -0
- package/bin/init/token.test.js.map +1 -0
- package/bin/output.js +72 -30
- package/bin/output.js.map +1 -1
- package/bin/pull.js +364 -214
- package/bin/pull.js.map +1 -1
- package/bin/pull.test.js +410 -0
- package/bin/pull.test.js.map +1 -0
- package/bin/remove-project.js +91 -27
- package/bin/remove-project.js.map +1 -1
- package/bin/replace.js +140 -100
- package/bin/replace.js.map +1 -1
- package/bin/replace.test.js +155 -0
- package/bin/replace.test.js.map +1 -0
- package/bin/sentry-test.js.map +1 -0
- package/bin/types.js +20 -2
- package/bin/types.js.map +1 -1
- package/bin/utils/cleanFileName.js +32 -8
- package/bin/utils/cleanFileName.js.map +1 -1
- package/bin/utils/createSentryContext.js +43 -0
- package/bin/utils/createSentryContext.js.map +1 -0
- package/bin/utils/generateJsDriver.js +90 -51
- package/bin/utils/generateJsDriver.js.map +1 -1
- package/bin/utils/getSelectedProjects.js +58 -52
- package/bin/utils/getSelectedProjects.js.map +1 -1
- package/bin/utils/processMetaOption.js +36 -11
- package/bin/utils/processMetaOption.js.map +1 -1
- package/bin/utils/processMetaOption.test.js +45 -0
- package/bin/utils/processMetaOption.test.js.map +1 -0
- package/bin/utils/projectsToText.js +52 -19
- package/bin/utils/projectsToText.js.map +1 -1
- package/bin/utils/promptForProject.js +89 -36
- package/bin/utils/promptForProject.js.map +1 -1
- package/bin/utils/quit.js +36 -7
- package/bin/utils/quit.js.map +1 -1
- package/bin/utils/sourcesToText.js +51 -19
- package/bin/utils/sourcesToText.js.map +1 -1
- package/etsc.config.js +13 -0
- package/lib/config.ts +8 -2
- package/lib/ditto.ts +6 -0
- package/lib/init/project.ts +2 -2
- package/lib/pull.test.ts +289 -101
- package/lib/pull.ts +39 -7
- package/lib/utils/createSentryContext.ts +20 -0
- package/lib/utils/quit.ts +2 -3
- package/package.json +11 -6
- package/tsconfig.json +4 -1
- package/bin/lib/add-project.js +0 -36
- package/bin/lib/add-project.js.map +0 -1
- package/bin/lib/api.js +0 -20
- package/bin/lib/api.js.map +0 -1
- package/bin/lib/config.js +0 -202
- package/bin/lib/config.js.map +0 -1
- package/bin/lib/consts.js +0 -21
- package/bin/lib/consts.js.map +0 -1
- package/bin/lib/ditto.js +0 -121
- package/bin/lib/ditto.js.map +0 -1
- package/bin/lib/generate-suggestions.js +0 -71
- package/bin/lib/generate-suggestions.js.map +0 -1
- package/bin/lib/http/fetchComponents.js +0 -13
- package/bin/lib/http/fetchComponents.js.map +0 -1
- package/bin/lib/http/fetchVariants.js +0 -26
- package/bin/lib/http/fetchVariants.js.map +0 -1
- package/bin/lib/init/init.js +0 -50
- package/bin/lib/init/init.js.map +0 -1
- package/bin/lib/init/project.js +0 -108
- package/bin/lib/init/project.js.map +0 -1
- package/bin/lib/init/token.js +0 -91
- package/bin/lib/init/token.js.map +0 -1
- package/bin/lib/output.js +0 -34
- package/bin/lib/output.js.map +0 -1
- package/bin/lib/pull.js +0 -264
- package/bin/lib/pull.js.map +0 -1
- package/bin/lib/remove-project.js +0 -35
- package/bin/lib/remove-project.js.map +0 -1
- package/bin/lib/replace.js +0 -107
- package/bin/lib/replace.js.map +0 -1
- package/bin/lib/types.js +0 -3
- package/bin/lib/types.js.map +0 -1
- package/bin/lib/utils/cleanFileName.js +0 -11
- package/bin/lib/utils/cleanFileName.js.map +0 -1
- package/bin/lib/utils/generateJsDriver.js +0 -56
- package/bin/lib/utils/generateJsDriver.js.map +0 -1
- package/bin/lib/utils/getSelectedProjects.js +0 -61
- package/bin/lib/utils/getSelectedProjects.js.map +0 -1
- package/bin/lib/utils/processMetaOption.js +0 -15
- package/bin/lib/utils/processMetaOption.js.map +0 -1
- package/bin/lib/utils/projectsToText.js +0 -25
- package/bin/lib/utils/projectsToText.js.map +0 -1
- package/bin/lib/utils/promptForProject.js +0 -43
- package/bin/lib/utils/promptForProject.js.map +0 -1
- package/bin/lib/utils/quit.js +0 -10
- package/bin/lib/utils/quit.js.map +0 -1
- package/bin/lib/utils/sourcesToText.js +0 -25
- package/bin/lib/utils/sourcesToText.js.map +0 -1
- package/bin/package.json +0 -76
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Ditto Tech, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/bin/add-project.js
CHANGED
|
@@ -1,36 +1,104 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="341fbe24-4d10-55cb-81ec-4b58e4cf2348")}catch(e){}}();
|
|
3
|
+
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
4
13
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const projects = (0, getSelectedProjects_1.getSelectedProjects)();
|
|
13
|
-
const usingComponents = (0, getSelectedProjects_1.getIsUsingComponents)();
|
|
14
|
-
try {
|
|
15
|
-
if (usingComponents) {
|
|
16
|
-
if (projects.length) {
|
|
17
|
-
console.log(`\nYou're currently syncing text from the ${output_1.default.info("Component Library")} and from the following projects: ${(0, projectsToText_1.default)(projects)}`);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
console.log(`\nYou're currently only syncing text from the ${output_1.default.info("Component Library")}`);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
else if (projects.length) {
|
|
24
|
-
console.log(`\nYou're currently set up to sync text from the following projects: ${(0, projectsToText_1.default)(projects)}`);
|
|
25
|
-
}
|
|
26
|
-
await (0, project_1.collectAndSaveSource)({
|
|
27
|
-
components: false,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
catch (error) {
|
|
31
|
-
console.log(`\nSorry, there was an error adding a project to your workspace: `, error);
|
|
32
|
-
(0, quit_1.quit)("Project selection was not updated.");
|
|
33
|
-
}
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
34
21
|
};
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
var __async = (__this, __arguments, generator) => {
|
|
32
|
+
return new Promise((resolve, reject) => {
|
|
33
|
+
var fulfilled = (value) => {
|
|
34
|
+
try {
|
|
35
|
+
step(generator.next(value));
|
|
36
|
+
} catch (e) {
|
|
37
|
+
reject(e);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var rejected = (value) => {
|
|
41
|
+
try {
|
|
42
|
+
step(generator.throw(value));
|
|
43
|
+
} catch (e) {
|
|
44
|
+
reject(e);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
48
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
var add_project_exports = {};
|
|
52
|
+
__export(add_project_exports, {
|
|
53
|
+
default: () => add_project_default
|
|
54
|
+
});
|
|
55
|
+
module.exports = __toCommonJS(add_project_exports);
|
|
56
|
+
var import_project = require("./init/project");
|
|
57
|
+
var import_projectsToText = __toESM(require("./utils/projectsToText"));
|
|
58
|
+
var import_getSelectedProjects = require("./utils/getSelectedProjects");
|
|
59
|
+
var import_output = __toESM(require("./output"));
|
|
60
|
+
var import_quit = require("./utils/quit");
|
|
61
|
+
const addProject = () => __async(void 0, null, function* () {
|
|
62
|
+
const projects = (0, import_getSelectedProjects.getSelectedProjects)();
|
|
63
|
+
const usingComponents = (0, import_getSelectedProjects.getIsUsingComponents)();
|
|
64
|
+
try {
|
|
65
|
+
if (usingComponents) {
|
|
66
|
+
if (projects.length) {
|
|
67
|
+
console.log(
|
|
68
|
+
`
|
|
69
|
+
You're currently syncing text from the ${import_output.default.info(
|
|
70
|
+
"Component Library"
|
|
71
|
+
)} and from the following projects: ${(0, import_projectsToText.default)(projects)}`
|
|
72
|
+
);
|
|
73
|
+
} else {
|
|
74
|
+
console.log(
|
|
75
|
+
`
|
|
76
|
+
You're currently only syncing text from the ${import_output.default.info(
|
|
77
|
+
"Component Library"
|
|
78
|
+
)}`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
} else if (projects.length) {
|
|
82
|
+
console.log(
|
|
83
|
+
`
|
|
84
|
+
You're currently set up to sync text from the following projects: ${(0, import_projectsToText.default)(
|
|
85
|
+
projects
|
|
86
|
+
)}`
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
yield (0, import_project.collectAndSaveSource)({
|
|
90
|
+
components: false
|
|
91
|
+
});
|
|
92
|
+
} catch (error) {
|
|
93
|
+
console.log(
|
|
94
|
+
`
|
|
95
|
+
Sorry, there was an error adding a project to your workspace: `,
|
|
96
|
+
error
|
|
97
|
+
);
|
|
98
|
+
(0, import_quit.quit)("Project selection was not updated.");
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
var add_project_default = addProject;
|
|
102
|
+
//# sourceMappingURL=add-project.js.map
|
|
103
|
+
|
|
104
|
+
//# debugId=341fbe24-4d10-55cb-81ec-4b58e4cf2348
|
package/bin/add-project.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../lib/add-project.ts"],"sourcesContent":["import { collectAndSaveSource } from \"./init/project\";\nimport projectsToText from \"./utils/projectsToText\";\nimport {\n getSelectedProjects,\n getIsUsingComponents,\n} from \"./utils/getSelectedProjects\";\nimport output from \"./output\";\nimport { quit } from \"./utils/quit\";\n\nconst addProject = async () => {\n const projects = getSelectedProjects();\n const usingComponents = getIsUsingComponents();\n\n try {\n if (usingComponents) {\n if (projects.length) {\n console.log(\n `\\nYou're currently syncing text from the ${output.info(\n \"Component Library\"\n )} and from the following projects: ${projectsToText(projects)}`\n );\n } else {\n console.log(\n `\\nYou're currently only syncing text from the ${output.info(\n \"Component Library\"\n )}`\n );\n }\n } else if (projects.length) {\n console.log(\n `\\nYou're currently set up to sync text from the following projects: ${projectsToText(\n projects\n )}`\n );\n }\n await collectAndSaveSource({\n components: false,\n });\n } catch (error) {\n console.log(\n `\\nSorry, there was an error adding a project to your workspace: `,\n error\n );\n quit(\"Project selection was not updated.\");\n }\n};\n\nexport default addProject;\n"],"names":["output","projectsToText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAqC;AACrC,4BAA2B;AAC3B,iCAGO;AACP,oBAAmB;AACnB,kBAAqB;AAErB,MAAM,aAAa,MAAY;AAC7B,QAAM,eAAW,gDAAoB;AACrC,QAAM,sBAAkB,iDAAqB;AAE7C,MAAI;AACF,QAAI,iBAAiB;AACnB,UAAI,SAAS,QAAQ;AACnB,gBAAQ;AAAA,UACN;AAAA,yCAA4C,cAAAA,QAAO;AAAA,YACjD;AAAA,UACF,CAAC,yCAAqC,sBAAAC,SAAe,QAAQ,CAAC;AAAA,QAChE;AAAA,MACF,OAAO;AACL,gBAAQ;AAAA,UACN;AAAA,8CAAiD,cAAAD,QAAO;AAAA,YACtD;AAAA,UACF,CAAC;AAAA,QACH;AAAA,MACF;AAAA,IACF,WAAW,SAAS,QAAQ;AAC1B,cAAQ;AAAA,QACN;AAAA,wEAAuE,sBAAAC;AAAA,UACrE;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AACA,cAAM,qCAAqB;AAAA,MACzB,YAAY;AAAA,IACd,CAAC;AAAA,EACH,SAAS,OAAO;AACd,YAAQ;AAAA,MACN;AAAA;AAAA,MACA;AAAA,IACF;AACA,0BAAK,oCAAoC;AAAA,EAC3C;AACF;AAEA,IAAO,sBAAQ","debug_id":"341fbe24-4d10-55cb-81ec-4b58e4cf2348"}
|
package/bin/api.js
CHANGED
|
@@ -1,19 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="60c0c8b2-1610-5e22-a814-c819798eb831")}catch(e){}}();
|
|
3
|
+
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
4
13
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
|
+
var api_exports = {};
|
|
32
|
+
__export(api_exports, {
|
|
33
|
+
createApiClient: () => createApiClient
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(api_exports);
|
|
36
|
+
var import_axios = __toESM(require("axios"));
|
|
37
|
+
var import_config = __toESM(require("./config"));
|
|
38
|
+
var import_consts = __toESM(require("./consts"));
|
|
10
39
|
function createApiClient(token) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
40
|
+
return import_axios.default.create({
|
|
41
|
+
baseURL: import_consts.default.API_HOST,
|
|
42
|
+
headers: {
|
|
43
|
+
Authorization: `token ${token || import_config.default.getToken(import_consts.default.CONFIG_FILE, import_consts.default.API_HOST)}`
|
|
44
|
+
}
|
|
45
|
+
});
|
|
17
46
|
}
|
|
18
|
-
|
|
19
|
-
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
createApiClient
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=api.js.map
|
|
52
|
+
|
|
53
|
+
//# debugId=60c0c8b2-1610-5e22-a814-c819798eb831
|
package/bin/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../lib/api.ts"],"sourcesContent":["import axios from \"axios\";\n\nimport config from \"./config\";\nimport consts from \"./consts\";\n\nexport function createApiClient(token?: string) {\n return axios.create({\n baseURL: consts.API_HOST,\n headers: {\n Authorization: `token ${\n token || config.getToken(consts.CONFIG_FILE, consts.API_HOST)\n }`,\n },\n });\n}\n"],"names":["axios","consts","config"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,oBAAmB;AACnB,oBAAmB;AAEZ,SAAS,gBAAgB,OAAgB;AAC9C,SAAO,aAAAA,QAAM,OAAO;AAAA,IAClB,SAAS,cAAAC,QAAO;AAAA,IAChB,SAAS;AAAA,MACP,eAAe,SACb,SAAS,cAAAC,QAAO,SAAS,cAAAD,QAAO,aAAa,cAAAA,QAAO,QAAQ,CAC9D;AAAA,IACF;AAAA,EACF,CAAC;AACH","debug_id":"60c0c8b2-1610-5e22-a814-c819798eb831"}
|
package/bin/component-folders.js
CHANGED
|
@@ -1,10 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8df60202-713f-56b5-a6d5-8b65d7194665")}catch(e){}}();
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var __async = (__this, __arguments, generator) => {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
var fulfilled = (value) => {
|
|
24
|
+
try {
|
|
25
|
+
step(generator.next(value));
|
|
26
|
+
} catch (e) {
|
|
27
|
+
reject(e);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
var rejected = (value) => {
|
|
31
|
+
try {
|
|
32
|
+
step(generator.throw(value));
|
|
33
|
+
} catch (e) {
|
|
34
|
+
reject(e);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
38
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
var component_folders_exports = {};
|
|
42
|
+
__export(component_folders_exports, {
|
|
43
|
+
showComponentFolders: () => showComponentFolders
|
|
44
|
+
});
|
|
45
|
+
module.exports = __toCommonJS(component_folders_exports);
|
|
46
|
+
var import_fetchComponentFolders = require("./http/fetchComponentFolders");
|
|
47
|
+
function showComponentFolders() {
|
|
48
|
+
return __async(this, null, function* () {
|
|
49
|
+
const folders = yield (0, import_fetchComponentFolders.fetchComponentFolders)();
|
|
7
50
|
console.log(JSON.stringify(folders));
|
|
51
|
+
});
|
|
8
52
|
}
|
|
9
|
-
|
|
10
|
-
|
|
53
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
54
|
+
0 && (module.exports = {
|
|
55
|
+
showComponentFolders
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=component-folders.js.map
|
|
58
|
+
|
|
59
|
+
//# debugId=8df60202-713f-56b5-a6d5-8b65d7194665
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../lib/component-folders.ts"],"sourcesContent":["import { fetchComponentFolders } from \"./http/fetchComponentFolders\";\n\nasync function showComponentFolders() {\n const folders = await fetchComponentFolders();\n\n console.log(JSON.stringify(folders));\n}\n\nexport { showComponentFolders };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAsC;AAEtC,SAAe,uBAAuB;AAAA;AACpC,UAAM,UAAU,UAAM,oDAAsB;AAE5C,YAAQ,IAAI,KAAK,UAAU,OAAO,CAAC;AAAA,EACrC;AAAA","debug_id":"8df60202-713f-56b5-a6d5-8b65d7194665"}
|