@cimplify/cli 0.11.1 → 0.12.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/dist/{chunk-3NDTR4GA.mjs → chunk-EL34CORK.mjs} +1 -1
- package/dist/{chunk-OMAF2H6T.mjs → chunk-W64GWXPF.mjs} +1 -1
- package/dist/dev-3TPDHU67.mjs +1724 -0
- package/dist/dispatcher.mjs +7 -7
- package/dist/{doctor-LAKJKBFU.mjs → doctor-JQYXARYQ.mjs} +2 -2
- package/dist/{explain-EZ7DC4KE.mjs → explain-2I4MWMPY.mjs} +1 -1
- package/dist/{introspect-HVT3TMAM.mjs → introspect-TB2QFQMF.mjs} +2 -2
- package/dist/{preview-config-CHDYYWUY.mjs → preview-config-344CUZLO.mjs} +8 -4
- package/dist/{update-74UVN3R7.mjs → update-T5O6YCIC.mjs} +1 -1
- package/package.json +1 -1
- package/dist/dev-B4YUYQ4I.mjs +0 -782
package/dist/dispatcher.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-W64GWXPF.mjs';
|
|
3
3
|
import { TEMPLATES } from './chunk-W3WLADJP.mjs';
|
|
4
4
|
|
|
5
5
|
// src/dispatcher.ts
|
|
@@ -142,18 +142,18 @@ var COMMANDS = {
|
|
|
142
142
|
domains: () => import('./domains-H3K2WW55.mjs'),
|
|
143
143
|
logs: () => import('./logs-2ECJQ3MU.mjs'),
|
|
144
144
|
status: () => import('./status-IA7PJ4TV.mjs'),
|
|
145
|
-
dev: () => import('./dev-
|
|
145
|
+
dev: () => import('./dev-3TPDHU67.mjs'),
|
|
146
146
|
mock: () => import('./mock-TSUKCLWU.mjs'),
|
|
147
|
-
introspect: () => import('./introspect-
|
|
147
|
+
introspect: () => import('./introspect-TB2QFQMF.mjs'),
|
|
148
148
|
inspect: () => import('./inspect-CGYX4DDF.mjs'),
|
|
149
|
-
doctor: () => import('./doctor-
|
|
150
|
-
explain: () => import('./explain-
|
|
149
|
+
doctor: () => import('./doctor-JQYXARYQ.mjs'),
|
|
150
|
+
explain: () => import('./explain-2I4MWMPY.mjs'),
|
|
151
151
|
assets: () => import('./assets-4D7VXRUE.mjs'),
|
|
152
152
|
repo: () => import('./repo-WSUAHXWO.mjs'),
|
|
153
153
|
list: () => import('./list-27TS2L47.mjs'),
|
|
154
154
|
add: () => import('./add-5ODVFWVR.mjs'),
|
|
155
|
-
update: () => import('./update-
|
|
156
|
-
upgrade: () => import('./update-
|
|
155
|
+
update: () => import('./update-T5O6YCIC.mjs'),
|
|
156
|
+
upgrade: () => import('./update-T5O6YCIC.mjs'),
|
|
157
157
|
"auth-step-up": () => import('./auth-step-up-NOSM4PUR.mjs')
|
|
158
158
|
};
|
|
159
159
|
var COMMAND_PREFIXES = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { gatherIntrospection } from './chunk-
|
|
2
|
+
import { gatherIntrospection } from './chunk-EL34CORK.mjs';
|
|
3
3
|
import './chunk-K5464A3L.mjs';
|
|
4
4
|
import './chunk-DBZ3UOQ2.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-W64GWXPF.mjs';
|
|
6
6
|
import { parseArgs, flagBool } from './chunk-C4M3DXKC.mjs';
|
|
7
7
|
import { SDK_ENV_API_URL, DEFAULT_API_BASE_URL, ApiClient, ENV_API_BASE_URL } from './chunk-F4S5KETY.mjs';
|
|
8
8
|
import { readAuthOrNull } from './chunk-UBAI443T.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-W64GWXPF.mjs';
|
|
3
3
|
import { parseArgs } from './chunk-C4M3DXKC.mjs';
|
|
4
4
|
import { bold, dim, info, result, CliError, CLI_ERROR_CODE } from './chunk-E2T2SBP5.mjs';
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { run as default, extractMockSeed, gatherIntrospection, renderIntrospection } from './chunk-
|
|
2
|
+
export { run as default, extractMockSeed, gatherIntrospection, renderIntrospection } from './chunk-EL34CORK.mjs';
|
|
3
3
|
import './chunk-K5464A3L.mjs';
|
|
4
4
|
import './chunk-DBZ3UOQ2.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-W64GWXPF.mjs';
|
|
6
6
|
import './chunk-C4M3DXKC.mjs';
|
|
7
7
|
import './chunk-UBAI443T.mjs';
|
|
8
8
|
import './chunk-E2T2SBP5.mjs';
|
|
@@ -85,21 +85,25 @@ function upsertOrigin(config, origin) {
|
|
|
85
85
|
);
|
|
86
86
|
return true;
|
|
87
87
|
}
|
|
88
|
-
function injectAllowedDevOrigins(source,
|
|
88
|
+
function injectAllowedDevOrigins(source, origins) {
|
|
89
89
|
const ast = parse(source, {
|
|
90
90
|
sourceType: "module",
|
|
91
91
|
plugins: ["typescript"]
|
|
92
92
|
});
|
|
93
93
|
const config = findConfigObject(ast);
|
|
94
94
|
if (!config) return { code: source, changed: false, resolved: false };
|
|
95
|
-
|
|
95
|
+
let changed = false;
|
|
96
|
+
for (const origin of origins) {
|
|
97
|
+
if (upsertOrigin(config, origin)) changed = true;
|
|
98
|
+
}
|
|
99
|
+
if (!changed) return { code: source, changed: false, resolved: true };
|
|
96
100
|
return {
|
|
97
101
|
code: generate(ast, { retainLines: true }, source).code,
|
|
98
102
|
changed: true,
|
|
99
103
|
resolved: true
|
|
100
104
|
};
|
|
101
105
|
}
|
|
102
|
-
async function ensurePreviewOrigin(cwd,
|
|
106
|
+
async function ensurePreviewOrigin(cwd, origins) {
|
|
103
107
|
for (const filename of CONFIG_FILENAMES) {
|
|
104
108
|
const file = path.join(cwd, filename);
|
|
105
109
|
let source;
|
|
@@ -109,7 +113,7 @@ async function ensurePreviewOrigin(cwd, origin) {
|
|
|
109
113
|
if (err.code === "ENOENT") continue;
|
|
110
114
|
throw err;
|
|
111
115
|
}
|
|
112
|
-
const { code, changed, resolved } = injectAllowedDevOrigins(source,
|
|
116
|
+
const { code, changed, resolved } = injectAllowedDevOrigins(source, origins);
|
|
113
117
|
if (!resolved) return { status: "unrecognized", file: filename };
|
|
114
118
|
if (changed) await promises.writeFile(file, code, "utf8");
|
|
115
119
|
return { status: changed ? "injected" : "already-present", file: filename };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-W64GWXPF.mjs';
|
|
3
3
|
import { promptYesNo } from './chunk-ITAFAORS.mjs';
|
|
4
4
|
import { parseArgs, flagBool, flagString } from './chunk-C4M3DXKC.mjs';
|
|
5
5
|
import { success, bold, info, dim, result, failure, CliError, CLI_ERROR_CODE, step, isJsonMode } from './chunk-E2T2SBP5.mjs';
|