@cimplify/cli 0.13.4 → 0.13.5
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/{add-542NLKYG.mjs → add-NZ47GUMD.mjs} +1 -1
- package/dist/{chunk-7NUSJVN3.mjs → chunk-5YVMA7A5.mjs} +2 -2
- package/dist/{chunk-VCDGYXFU.mjs → chunk-BDC7XQIL.mjs} +8 -8
- package/dist/{chunk-HJQ6PF5N.mjs → chunk-GOTWRZVM.mjs} +1 -1
- package/dist/dispatcher.mjs +10 -10
- package/dist/{doctor-E6JH4VSN.mjs → doctor-6NI2XNTD.mjs} +2 -2
- package/dist/{explain-SZPLL5MP.mjs → explain-HPRJBFHS.mjs} +1 -1
- package/dist/{introspect-SDHD3PVX.mjs → introspect-3OYRCVUF.mjs} +2 -2
- package/dist/{lint-NM3APP7L.mjs → lint-EYKIQ6RO.mjs} +9 -5
- package/dist/{list-W5JABY7B.mjs → list-QNEUCCP5.mjs} +1 -1
- package/dist/{update-447FR363.mjs → update-47HG7LN7.mjs} +1 -1
- package/package.json +2 -2
- package/templates/storefront-auto/package.json +1 -1
- package/templates/storefront-bakery/package.json +1 -1
- package/templates/storefront-fashion/package.json +1 -1
- package/templates/storefront-grocery/package.json +1 -1
- package/templates/storefront-pharmacy/package.json +1 -1
- package/templates/storefront-restaurant/package.json +1 -1
- package/templates/storefront-retail/package.json +1 -1
- package/templates/storefront-services/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { gitDetectRoot, gitCurrentBranch, gitCurrentSha, gitStatusPorcelain } from './chunk-MLVBE5V2.mjs';
|
|
3
3
|
import { parseEnvFile } from './chunk-RU53TQLZ.mjs';
|
|
4
|
-
import { package_default } from './chunk-
|
|
4
|
+
import { package_default } from './chunk-5YVMA7A5.mjs';
|
|
5
5
|
import { parseArgs } from './chunk-5KYR6WJB.mjs';
|
|
6
6
|
import { readAuthOrNull, readProjectLinkOrNull, readProjectState } from './chunk-6CHBU7O4.mjs';
|
|
7
7
|
import { bold, dim, yellow, green, info, result, red } from './chunk-4O4G2CDE.mjs';
|
package/dist/dispatcher.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { TEMPLATES } from './chunk-
|
|
3
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { TEMPLATES } from './chunk-BDC7XQIL.mjs';
|
|
3
|
+
import { package_default } from './chunk-5YVMA7A5.mjs';
|
|
4
4
|
|
|
5
5
|
// src/dispatcher.ts
|
|
6
6
|
var VERSION = package_default.version ?? "unknown";
|
|
@@ -149,17 +149,17 @@ var COMMANDS = {
|
|
|
149
149
|
status: () => import('./status-52HG63FE.mjs'),
|
|
150
150
|
dev: () => import('./dev-L3W6UXYN.mjs'),
|
|
151
151
|
mock: () => import('./mock-CAWNXSGC.mjs'),
|
|
152
|
-
introspect: () => import('./introspect-
|
|
152
|
+
introspect: () => import('./introspect-3OYRCVUF.mjs'),
|
|
153
153
|
inspect: () => import('./inspect-MGVG4Z44.mjs'),
|
|
154
|
-
doctor: () => import('./doctor-
|
|
155
|
-
lint: () => import('./lint-
|
|
156
|
-
explain: () => import('./explain-
|
|
154
|
+
doctor: () => import('./doctor-6NI2XNTD.mjs'),
|
|
155
|
+
lint: () => import('./lint-EYKIQ6RO.mjs'),
|
|
156
|
+
explain: () => import('./explain-HPRJBFHS.mjs'),
|
|
157
157
|
assets: () => import('./assets-OEY6FHHZ.mjs'),
|
|
158
158
|
repo: () => import('./repo-IE5IOLR5.mjs'),
|
|
159
|
-
list: () => import('./list-
|
|
160
|
-
add: () => import('./add-
|
|
161
|
-
update: () => import('./update-
|
|
162
|
-
upgrade: () => import('./update-
|
|
159
|
+
list: () => import('./list-QNEUCCP5.mjs'),
|
|
160
|
+
add: () => import('./add-NZ47GUMD.mjs'),
|
|
161
|
+
update: () => import('./update-47HG7LN7.mjs'),
|
|
162
|
+
upgrade: () => import('./update-47HG7LN7.mjs'),
|
|
163
163
|
"auth-step-up": () => import('./auth-step-up-ALEUQUCE.mjs')
|
|
164
164
|
};
|
|
165
165
|
var COMMAND_PREFIXES = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { gatherIntrospection } from './chunk-
|
|
2
|
+
import { gatherIntrospection } from './chunk-GOTWRZVM.mjs';
|
|
3
3
|
import './chunk-MLVBE5V2.mjs';
|
|
4
4
|
import './chunk-RU53TQLZ.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-5YVMA7A5.mjs';
|
|
6
6
|
import { parseArgs, flagBool } from './chunk-5KYR6WJB.mjs';
|
|
7
7
|
import { SDK_ENV_API_URL, DEFAULT_API_BASE_URL, ApiClient, ENV_API_BASE_URL } from './chunk-TOQGLBWF.mjs';
|
|
8
8
|
import { readAuthOrNull } from './chunk-6CHBU7O4.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-5YVMA7A5.mjs';
|
|
3
3
|
import { parseArgs } from './chunk-5KYR6WJB.mjs';
|
|
4
4
|
import { bold, dim, info, result, CliError, CLI_ERROR_CODE } from './chunk-4O4G2CDE.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-GOTWRZVM.mjs';
|
|
3
3
|
import './chunk-MLVBE5V2.mjs';
|
|
4
4
|
import './chunk-RU53TQLZ.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-5YVMA7A5.mjs';
|
|
6
6
|
import './chunk-5KYR6WJB.mjs';
|
|
7
7
|
import './chunk-6CHBU7O4.mjs';
|
|
8
8
|
import './chunk-4O4G2CDE.mjs';
|
|
@@ -473,6 +473,13 @@ function subjectName(node) {
|
|
|
473
473
|
}
|
|
474
474
|
return null;
|
|
475
475
|
}
|
|
476
|
+
function normalizedSubjectName(name) {
|
|
477
|
+
return name.replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").replace(/[^A-Za-z\d]+/g, "_").toLowerCase();
|
|
478
|
+
}
|
|
479
|
+
function subjectMatches(node, pattern) {
|
|
480
|
+
const name = subjectName(node);
|
|
481
|
+
return name !== null && pattern !== void 0 && (pattern.test(name) || pattern.test(normalizedSubjectName(name)));
|
|
482
|
+
}
|
|
476
483
|
function sourceMatches(source, primitive) {
|
|
477
484
|
return primitive.sources.some((pattern) => sourcePatternMatches(source, pattern));
|
|
478
485
|
}
|
|
@@ -784,11 +791,9 @@ function analyzeSource(source, file, compiledRules, maxDiagnostics) {
|
|
|
784
791
|
if (!path4.parentPath.isJSXElement() && !path4.parentPath.isJSXFragment()) return;
|
|
785
792
|
const expression = unwrapExpression(path4.node.expression);
|
|
786
793
|
if (!expression || !t.isExpression(expression)) return;
|
|
787
|
-
const name = subjectName(expression);
|
|
788
|
-
if (!name) return;
|
|
789
794
|
for (const compiled of compiledRules) {
|
|
790
795
|
const primitive = compiled.rule.primitive;
|
|
791
|
-
if (primitive.kind !== "required-wrapper-call" || primitive.context !== "jsx-child" || !hasActivatingImport(importSources, primitive.activationImports) || !compiled.subjectPattern
|
|
796
|
+
if (primitive.kind !== "required-wrapper-call" || primitive.context !== "jsx-child" || !hasActivatingImport(importSources, primitive.activationImports) || !subjectMatches(expression, compiled.subjectPattern)) {
|
|
792
797
|
continue;
|
|
793
798
|
}
|
|
794
799
|
const fix = compiled.rule.fix ? jsxWrapperFix(ast, source, path4.node, expression, primitive, imports, path4) : void 0;
|
|
@@ -808,8 +813,7 @@ function analyzeSource(source, file, compiledRules, maxDiagnostics) {
|
|
|
808
813
|
if (t.isCallExpression(value) && t.isIdentifier(value.callee) && primitive.wrapper.syntax === "call" && bindingMatches(value.callee.name, primitive.wrapper.imports, imports)) {
|
|
809
814
|
continue;
|
|
810
815
|
}
|
|
811
|
-
|
|
812
|
-
if (name && compiled.subjectPattern?.test(name)) {
|
|
816
|
+
if (subjectMatches(value, compiled.subjectPattern)) {
|
|
813
817
|
emit(diagnostic(file, compiled.rule, value));
|
|
814
818
|
}
|
|
815
819
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { REGISTRY_INDEX } from './chunk-
|
|
2
|
+
import { REGISTRY_INDEX } from './chunk-BDC7XQIL.mjs';
|
|
3
3
|
import { parseArgs, flagBool } from './chunk-5KYR6WJB.mjs';
|
|
4
4
|
import { CliError, CLI_ERROR_CODE, info, bold, dim, green, result } from './chunk-4O4G2CDE.mjs';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-5YVMA7A5.mjs';
|
|
3
3
|
import { promptYesNo } from './chunk-5ZQURRIM.mjs';
|
|
4
4
|
import { parseArgs, flagBool, flagString } from './chunk-5KYR6WJB.mjs';
|
|
5
5
|
import { success, bold, info, dim, result, failure, CliError, CLI_ERROR_CODE, step, isJsonMode } from './chunk-4O4G2CDE.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cimplify/cli",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.5",
|
|
4
4
|
"description": "Cimplify CLI — deploy, manage env vars, link projects, and scaffold storefronts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cimplify",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@babel/parser": "^8.0.4",
|
|
42
42
|
"@babel/traverse": "^8.0.4",
|
|
43
43
|
"@babel/types": "^8.0.4",
|
|
44
|
-
"@cimplify/sdk": "^0.100.
|
|
44
|
+
"@cimplify/sdk": "^0.100.5",
|
|
45
45
|
"re2js": "^1.4.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|