@shopify/create-app 3.71.4 → 3.72.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-EHMCI3ZQ.js → chunk-2DIYMVG2.js} +3 -3
- package/dist/{chunk-V6QR4YF3.js → chunk-4LKBFY6F.js} +4 -4
- package/dist/{chunk-7KSICWEJ.js → chunk-525IGJJ5.js} +5 -5
- package/dist/{chunk-ZKG4HP53.js → chunk-5PUNFSIL.js} +2 -2
- package/dist/{chunk-QDHJLRQP.js → chunk-M6Q3ASB4.js} +4 -4
- package/dist/{chunk-AO4KDLMV.js → chunk-WZKOQGWB.js} +2 -2
- package/dist/{custom-oclif-loader-IEDAORQX.js → custom-oclif-loader-JSZXUC2U.js} +2 -2
- package/dist/{error-handler-Q746XAGH.js → error-handler-XO4P26KU.js} +6 -6
- package/dist/hooks/postrun.js +4 -4
- package/dist/hooks/prerun.js +4 -4
- package/dist/index.js +238 -48
- package/dist/{local-NMUF62ON.js → local-U3MIEMYK.js} +2 -2
- package/dist/{node-package-manager-E6UQACT4.js → node-package-manager-UJ52MDKV.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-MMDEJUP7.js → ui-NZKY4FDU.js} +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
errorHandler,
|
|
9
9
|
registerCleanBugsnagErrorsFromWithinPlugins,
|
|
10
10
|
require_end_of_stream
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-525IGJJ5.js";
|
|
12
12
|
import {
|
|
13
13
|
fanoutHooks,
|
|
14
14
|
getListOfTunnelPlugins,
|
|
15
15
|
reportAnalyticsEvent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-M6Q3ASB4.js";
|
|
17
17
|
import {
|
|
18
18
|
getOutputUpdateCLIReminder
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2DIYMVG2.js";
|
|
20
20
|
import {
|
|
21
21
|
CLI_KIT_VERSION,
|
|
22
22
|
ClientError,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
setNextDeprecationDate,
|
|
62
62
|
username,
|
|
63
63
|
z
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-4LKBFY6F.js";
|
|
65
65
|
import "./chunk-VSLR7ET4.js";
|
|
66
66
|
import {
|
|
67
67
|
LocalStorage,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
usesWorkspaces,
|
|
87
87
|
versionSatisfies,
|
|
88
88
|
writePackageJSON
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-WZKOQGWB.js";
|
|
90
90
|
import {
|
|
91
91
|
AbortController as AbortController2,
|
|
92
92
|
AbortError,
|
|
@@ -260,7 +260,7 @@ import {
|
|
|
260
260
|
use_stdin_default,
|
|
261
261
|
writeFile,
|
|
262
262
|
writeFileSync
|
|
263
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-5PUNFSIL.js";
|
|
264
264
|
import {
|
|
265
265
|
require_brace_expansion,
|
|
266
266
|
require_lib
|
|
@@ -142338,7 +142338,7 @@ async function performActionWithRetryAfterRecovery(performAction, recoveryProced
|
|
|
142338
142338
|
import stream from "node:stream/promises";
|
|
142339
142339
|
import * as gzip from "node:zlib";
|
|
142340
142340
|
import { fileURLToPath } from "node:url";
|
|
142341
|
-
var FUNCTION_RUNNER_VERSION = "v6.
|
|
142341
|
+
var FUNCTION_RUNNER_VERSION = "v6.4.0", JAVY_VERSION = "v4.0.0", JAVY_PLUGIN_VERSION = "v3.2.0", Executable = class {
|
|
142342
142342
|
constructor(name, version, gitHubRepo) {
|
|
142343
142343
|
this.name = name, this.version = version;
|
|
142344
142344
|
let filename = process.platform === "win32" ? `${name}.exe` : name;
|
|
@@ -142592,8 +142592,8 @@ async function runJavy(fun, options, extra = []) {
|
|
|
142592
142592
|
}
|
|
142593
142593
|
async function installJavy(app) {
|
|
142594
142594
|
if (app.allExtensions.some((ext) => ext.features.includes("function") && ext.isJavaScript)) {
|
|
142595
|
-
let javy = javyBinary();
|
|
142596
|
-
await downloadBinary(javy);
|
|
142595
|
+
let javy = javyBinary(), plugin = javyPluginBinary();
|
|
142596
|
+
await Promise.all([downloadBinary(javy), downloadBinary(plugin)]);
|
|
142597
142597
|
}
|
|
142598
142598
|
}
|
|
142599
142599
|
var DefaultJavyBuilder = {
|
|
@@ -142813,7 +142813,7 @@ async function showNotificationsIfNeeded(currentSurfaces, environment = process.
|
|
|
142813
142813
|
throw new AbortSilentError();
|
|
142814
142814
|
let errorMessage2 = `Error retrieving notifications: ${error.message}`;
|
|
142815
142815
|
outputDebug(errorMessage2);
|
|
142816
|
-
let { sendErrorToBugsnag } = await import("./error-handler-
|
|
142816
|
+
let { sendErrorToBugsnag } = await import("./error-handler-XO4P26KU.js");
|
|
142817
142817
|
await sendErrorToBugsnag(errorMessage2, "unexpected_error");
|
|
142818
142818
|
}
|
|
142819
142819
|
}
|
|
@@ -147996,11 +147996,19 @@ var PartnersClient = class {
|
|
|
147996
147996
|
async currentAccountInfo() {
|
|
147997
147997
|
return this.request(CurrentAccountInfoQuery);
|
|
147998
147998
|
}
|
|
147999
|
-
async targetSchemaDefinition(input) {
|
|
148000
|
-
|
|
147999
|
+
async targetSchemaDefinition(input, apiKey, _organizationId, _appId) {
|
|
148000
|
+
let transformedInput = {
|
|
148001
|
+
target: input.handle,
|
|
148002
|
+
version: input.version,
|
|
148003
|
+
apiKey
|
|
148004
|
+
};
|
|
148005
|
+
return (await this.request(TargetSchemaDefinitionQuery, transformedInput)).definition;
|
|
148001
148006
|
}
|
|
148002
|
-
async apiSchemaDefinition(input) {
|
|
148003
|
-
return (await this.request(ApiSchemaDefinitionQuery,
|
|
148007
|
+
async apiSchemaDefinition(input, apiKey, _organizationId, _appId) {
|
|
148008
|
+
return (await this.request(ApiSchemaDefinitionQuery, {
|
|
148009
|
+
...input,
|
|
148010
|
+
apiKey
|
|
148011
|
+
})).definition;
|
|
148004
148012
|
}
|
|
148005
148013
|
async migrateToUiExtension(input) {
|
|
148006
148014
|
return this.request(MigrateToUiExtensionQuery, input);
|
|
@@ -149615,6 +149623,146 @@ var PublicApiVersions2 = {
|
|
|
149615
149623
|
]
|
|
149616
149624
|
};
|
|
149617
149625
|
|
|
149626
|
+
// ../app/dist/cli/api/graphql/functions/generated/schema-definition-by-target.js
|
|
149627
|
+
init_cjs_shims();
|
|
149628
|
+
var SchemaDefinitionByTarget = {
|
|
149629
|
+
kind: "Document",
|
|
149630
|
+
definitions: [
|
|
149631
|
+
{
|
|
149632
|
+
kind: "OperationDefinition",
|
|
149633
|
+
operation: "query",
|
|
149634
|
+
name: { kind: "Name", value: "SchemaDefinitionByTarget" },
|
|
149635
|
+
variableDefinitions: [
|
|
149636
|
+
{
|
|
149637
|
+
kind: "VariableDefinition",
|
|
149638
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "handle" } },
|
|
149639
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
149640
|
+
},
|
|
149641
|
+
{
|
|
149642
|
+
kind: "VariableDefinition",
|
|
149643
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "version" } },
|
|
149644
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
149645
|
+
}
|
|
149646
|
+
],
|
|
149647
|
+
selectionSet: {
|
|
149648
|
+
kind: "SelectionSet",
|
|
149649
|
+
selections: [
|
|
149650
|
+
{
|
|
149651
|
+
kind: "Field",
|
|
149652
|
+
name: { kind: "Name", value: "target" },
|
|
149653
|
+
arguments: [
|
|
149654
|
+
{
|
|
149655
|
+
kind: "Argument",
|
|
149656
|
+
name: { kind: "Name", value: "handle" },
|
|
149657
|
+
value: { kind: "Variable", name: { kind: "Name", value: "handle" } }
|
|
149658
|
+
}
|
|
149659
|
+
],
|
|
149660
|
+
selectionSet: {
|
|
149661
|
+
kind: "SelectionSet",
|
|
149662
|
+
selections: [
|
|
149663
|
+
{
|
|
149664
|
+
kind: "Field",
|
|
149665
|
+
name: { kind: "Name", value: "api" },
|
|
149666
|
+
selectionSet: {
|
|
149667
|
+
kind: "SelectionSet",
|
|
149668
|
+
selections: [
|
|
149669
|
+
{
|
|
149670
|
+
kind: "Field",
|
|
149671
|
+
name: { kind: "Name", value: "schema" },
|
|
149672
|
+
arguments: [
|
|
149673
|
+
{
|
|
149674
|
+
kind: "Argument",
|
|
149675
|
+
name: { kind: "Name", value: "version" },
|
|
149676
|
+
value: { kind: "Variable", name: { kind: "Name", value: "version" } }
|
|
149677
|
+
}
|
|
149678
|
+
],
|
|
149679
|
+
selectionSet: {
|
|
149680
|
+
kind: "SelectionSet",
|
|
149681
|
+
selections: [
|
|
149682
|
+
{ kind: "Field", name: { kind: "Name", value: "definition" } },
|
|
149683
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
149684
|
+
]
|
|
149685
|
+
}
|
|
149686
|
+
},
|
|
149687
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
149688
|
+
]
|
|
149689
|
+
}
|
|
149690
|
+
},
|
|
149691
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
149692
|
+
]
|
|
149693
|
+
}
|
|
149694
|
+
}
|
|
149695
|
+
]
|
|
149696
|
+
}
|
|
149697
|
+
}
|
|
149698
|
+
]
|
|
149699
|
+
};
|
|
149700
|
+
|
|
149701
|
+
// ../app/dist/cli/api/graphql/functions/generated/schema-definition-by-api-type.js
|
|
149702
|
+
init_cjs_shims();
|
|
149703
|
+
var SchemaDefinitionByApiType = {
|
|
149704
|
+
kind: "Document",
|
|
149705
|
+
definitions: [
|
|
149706
|
+
{
|
|
149707
|
+
kind: "OperationDefinition",
|
|
149708
|
+
operation: "query",
|
|
149709
|
+
name: { kind: "Name", value: "SchemaDefinitionByApiType" },
|
|
149710
|
+
variableDefinitions: [
|
|
149711
|
+
{
|
|
149712
|
+
kind: "VariableDefinition",
|
|
149713
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "type" } },
|
|
149714
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
149715
|
+
},
|
|
149716
|
+
{
|
|
149717
|
+
kind: "VariableDefinition",
|
|
149718
|
+
variable: { kind: "Variable", name: { kind: "Name", value: "version" } },
|
|
149719
|
+
type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }
|
|
149720
|
+
}
|
|
149721
|
+
],
|
|
149722
|
+
selectionSet: {
|
|
149723
|
+
kind: "SelectionSet",
|
|
149724
|
+
selections: [
|
|
149725
|
+
{
|
|
149726
|
+
kind: "Field",
|
|
149727
|
+
name: { kind: "Name", value: "api" },
|
|
149728
|
+
arguments: [
|
|
149729
|
+
{
|
|
149730
|
+
kind: "Argument",
|
|
149731
|
+
name: { kind: "Name", value: "type" },
|
|
149732
|
+
value: { kind: "Variable", name: { kind: "Name", value: "type" } }
|
|
149733
|
+
}
|
|
149734
|
+
],
|
|
149735
|
+
selectionSet: {
|
|
149736
|
+
kind: "SelectionSet",
|
|
149737
|
+
selections: [
|
|
149738
|
+
{
|
|
149739
|
+
kind: "Field",
|
|
149740
|
+
name: { kind: "Name", value: "schema" },
|
|
149741
|
+
arguments: [
|
|
149742
|
+
{
|
|
149743
|
+
kind: "Argument",
|
|
149744
|
+
name: { kind: "Name", value: "version" },
|
|
149745
|
+
value: { kind: "Variable", name: { kind: "Name", value: "version" } }
|
|
149746
|
+
}
|
|
149747
|
+
],
|
|
149748
|
+
selectionSet: {
|
|
149749
|
+
kind: "SelectionSet",
|
|
149750
|
+
selections: [
|
|
149751
|
+
{ kind: "Field", name: { kind: "Name", value: "definition" } },
|
|
149752
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
149753
|
+
]
|
|
149754
|
+
}
|
|
149755
|
+
},
|
|
149756
|
+
{ kind: "Field", name: { kind: "Name", value: "__typename" } }
|
|
149757
|
+
]
|
|
149758
|
+
}
|
|
149759
|
+
}
|
|
149760
|
+
]
|
|
149761
|
+
}
|
|
149762
|
+
}
|
|
149763
|
+
]
|
|
149764
|
+
};
|
|
149765
|
+
|
|
149618
149766
|
// ../cli-kit/dist/public/node/api/app-management.js
|
|
149619
149767
|
init_cjs_shims();
|
|
149620
149768
|
var import_bottleneck = __toESM(require_lib3()), limiter = new import_bottleneck.default({
|
|
@@ -149722,6 +149870,29 @@ async function webhooksRequest(organizationId, query, token, variables) {
|
|
|
149722
149870
|
}));
|
|
149723
149871
|
}
|
|
149724
149872
|
|
|
149873
|
+
// ../cli-kit/dist/public/node/api/functions.js
|
|
149874
|
+
init_cjs_shims();
|
|
149875
|
+
var import_bottleneck4 = __toESM(require_lib3()), limiter4 = new import_bottleneck4.default({
|
|
149876
|
+
minTime: 150,
|
|
149877
|
+
maxConcurrent: 10
|
|
149878
|
+
});
|
|
149879
|
+
async function setupRequest3(orgId, token, appId) {
|
|
149880
|
+
let api = "Functions", url2 = `https://${await appManagementFqdn()}/functions/unstable/organizations/${orgId}/${appId}/graphql`;
|
|
149881
|
+
return {
|
|
149882
|
+
token,
|
|
149883
|
+
api,
|
|
149884
|
+
url: url2,
|
|
149885
|
+
responseOptions: { onResponse: handleDeprecations2 }
|
|
149886
|
+
};
|
|
149887
|
+
}
|
|
149888
|
+
async function functionsRequestDoc(orgId, query, token, appId, variables) {
|
|
149889
|
+
return await limiter4.schedule(async () => graphqlRequestDoc({
|
|
149890
|
+
...await setupRequest3(orgId, token, appId),
|
|
149891
|
+
query,
|
|
149892
|
+
variables
|
|
149893
|
+
}));
|
|
149894
|
+
}
|
|
149895
|
+
|
|
149725
149896
|
// ../app/dist/cli/utilities/developer-platform-client/app-management-client.js
|
|
149726
149897
|
var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates.json", AppManagementClient = class {
|
|
149727
149898
|
constructor(session) {
|
|
@@ -150128,11 +150299,24 @@ var TEMPLATE_JSON_URL = "https://cdn.shopify.com/static/cli/extensions/templates
|
|
|
150128
150299
|
async currentAccountInfo() {
|
|
150129
150300
|
throw new BugError("Not implemented: currentAccountInfo");
|
|
150130
150301
|
}
|
|
150131
|
-
async targetSchemaDefinition(
|
|
150132
|
-
|
|
150302
|
+
async targetSchemaDefinition(input, _apiKey, organizationId, appId) {
|
|
150303
|
+
try {
|
|
150304
|
+
let appIdNumber = String(numberFromGid(appId)), token = await this.token();
|
|
150305
|
+
return (await functionsRequestDoc(organizationId, SchemaDefinitionByTarget, token, appIdNumber, {
|
|
150306
|
+
handle: input.handle,
|
|
150307
|
+
version: input.version
|
|
150308
|
+
}))?.target?.api?.schema?.definition ?? null;
|
|
150309
|
+
} catch (error) {
|
|
150310
|
+
throw new AbortError(`Failed to fetch schema definition: ${error}`);
|
|
150311
|
+
}
|
|
150133
150312
|
}
|
|
150134
|
-
async apiSchemaDefinition(
|
|
150135
|
-
|
|
150313
|
+
async apiSchemaDefinition(input, _apiKey, organizationId, appId) {
|
|
150314
|
+
try {
|
|
150315
|
+
let appIdNumber = String(numberFromGid(appId)), token = await this.token();
|
|
150316
|
+
return (await functionsRequestDoc(organizationId, SchemaDefinitionByApiType, token, appIdNumber, input))?.api?.schema?.definition ?? null;
|
|
150317
|
+
} catch (error) {
|
|
150318
|
+
throw new AbortError(`Failed to fetch schema definition: ${error}`);
|
|
150319
|
+
}
|
|
150136
150320
|
}
|
|
150137
150321
|
async migrateToUiExtension(_input) {
|
|
150138
150322
|
throw new BugError("Not implemented: migrateToUiExtension");
|
|
@@ -151841,7 +152025,7 @@ init_cjs_shims();
|
|
|
151841
152025
|
init_cjs_shims();
|
|
151842
152026
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
151843
152027
|
async function launchCLI(options) {
|
|
151844
|
-
let { errorHandler: errorHandler2 } = await import("./error-handler-
|
|
152028
|
+
let { errorHandler: errorHandler2 } = await import("./error-handler-XO4P26KU.js"), { isDevelopment: isDevelopment2 } = await import("./local-U3MIEMYK.js"), oclif = await import("./lib-EGJUAXU5.js"), { ShopifyConfig } = await import("./custom-oclif-loader-JSZXUC2U.js");
|
|
151845
152029
|
isDevelopment2() && (oclif.default.settings.debug = !0);
|
|
151846
152030
|
try {
|
|
151847
152031
|
let config2 = new ShopifyConfig({ root: fileURLToPath2(options.moduleURL) });
|
|
@@ -151856,7 +152040,7 @@ var import_core3 = __toESM(require_lib());
|
|
|
151856
152040
|
async function warnIfOldNodeVersion(versions2 = process.versions) {
|
|
151857
152041
|
let nodeVersion = versions2.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
|
|
151858
152042
|
if (nodeMajorVersion < 18) {
|
|
151859
|
-
let { renderWarning: renderWarning2 } = await import("./ui-
|
|
152043
|
+
let { renderWarning: renderWarning2 } = await import("./ui-NZKY4FDU.js");
|
|
151860
152044
|
renderWarning2({
|
|
151861
152045
|
headline: "Upgrade to a supported Node version now.",
|
|
151862
152046
|
body: [
|
|
@@ -151883,7 +152067,7 @@ async function runCLI(options, launchCLI2 = launchCLI, argv = process.argv, env
|
|
|
151883
152067
|
return setupEnvironmentVariables(options, argv, env), options.runInCreateMode && await addInitToArgvWhenRunningCreateCLI(options, argv), forceNoColor(argv, env), await warnIfOldNodeVersion(versions2), launchCLI2({ moduleURL: options.moduleURL });
|
|
151884
152068
|
}
|
|
151885
152069
|
async function addInitToArgvWhenRunningCreateCLI(options, argv = process.argv) {
|
|
151886
|
-
let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-
|
|
152070
|
+
let { findUpAndReadPackageJson: findUpAndReadPackageJson2 } = await import("./node-package-manager-UJ52MDKV.js"), { moduleDirectory: moduleDirectory2 } = await import("./path-3RNJ32DF.js"), name = (await findUpAndReadPackageJson2(moduleDirectory2(options.moduleURL))).content.name.replace("@shopify/create-", "");
|
|
151887
152071
|
if (argv.findIndex((arg) => arg.includes("init")) === -1) {
|
|
151888
152072
|
let initIndex2 = argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
|
|
151889
152073
|
argv.splice(initIndex2, 0, "init");
|
|
@@ -157092,7 +157276,7 @@ var THEME_DIRECTORY_PATTERNS = [
|
|
|
157092
157276
|
"templates/customers/**/*.{liquid,json}"
|
|
157093
157277
|
], THEME_PARTITION_REGEX = {
|
|
157094
157278
|
sectionLiquidRegex: /^sections\/.+\.liquid$/,
|
|
157095
|
-
|
|
157279
|
+
blockLiquidRegex: /^blocks\/.+\.liquid$/,
|
|
157096
157280
|
configRegex: /^config\/(settings_schema|settings_data)\.json$/,
|
|
157097
157281
|
sectionJsonRegex: /^sections\/.+\.json$/,
|
|
157098
157282
|
templateJsonRegex: /^templates\/.+\.json$/,
|
|
@@ -157246,10 +157430,10 @@ async function removeThemeFile(root, path) {
|
|
|
157246
157430
|
await removeFile(absolutePath);
|
|
157247
157431
|
}
|
|
157248
157432
|
function partitionThemeFiles(files) {
|
|
157249
|
-
let sectionLiquidFiles = [], otherLiquidFiles = [], sectionJsonFiles = [], templateJsonFiles = [], otherJsonFiles = [], contextualizedJsonFiles = [], configFiles = [], staticAssetFiles = [];
|
|
157433
|
+
let sectionLiquidFiles = [], otherLiquidFiles = [], sectionJsonFiles = [], templateJsonFiles = [], otherJsonFiles = [], contextualizedJsonFiles = [], configFiles = [], staticAssetFiles = [], blockLiquidFiles = [];
|
|
157250
157434
|
return files.forEach((file) => {
|
|
157251
157435
|
let fileKey = file.key;
|
|
157252
|
-
fileKey.endsWith(".liquid") ? THEME_PARTITION_REGEX.sectionLiquidRegex.test(fileKey) ? sectionLiquidFiles.push(file) : otherLiquidFiles.push(file) : THEME_PARTITION_REGEX.configRegex.test(fileKey) ? configFiles.push(file) : THEME_PARTITION_REGEX.jsonRegex.test(fileKey) ? THEME_PARTITION_REGEX.contextualizedJsonRegex.test(fileKey) ? contextualizedJsonFiles.push(file) : THEME_PARTITION_REGEX.sectionJsonRegex.test(fileKey) ? sectionJsonFiles.push(file) : THEME_PARTITION_REGEX.templateJsonRegex.test(fileKey) ? templateJsonFiles.push(file) : otherJsonFiles.push(file) : THEME_PARTITION_REGEX.staticAssetRegex.test(fileKey) && staticAssetFiles.push(file);
|
|
157436
|
+
fileKey.endsWith(".liquid") ? THEME_PARTITION_REGEX.sectionLiquidRegex.test(fileKey) ? sectionLiquidFiles.push(file) : THEME_PARTITION_REGEX.blockLiquidRegex.test(fileKey) ? blockLiquidFiles.push(file) : otherLiquidFiles.push(file) : THEME_PARTITION_REGEX.configRegex.test(fileKey) ? configFiles.push(file) : THEME_PARTITION_REGEX.jsonRegex.test(fileKey) ? THEME_PARTITION_REGEX.contextualizedJsonRegex.test(fileKey) ? contextualizedJsonFiles.push(file) : THEME_PARTITION_REGEX.sectionJsonRegex.test(fileKey) ? sectionJsonFiles.push(file) : THEME_PARTITION_REGEX.templateJsonRegex.test(fileKey) ? templateJsonFiles.push(file) : otherJsonFiles.push(file) : THEME_PARTITION_REGEX.staticAssetRegex.test(fileKey) && staticAssetFiles.push(file);
|
|
157253
157437
|
}), {
|
|
157254
157438
|
sectionLiquidFiles,
|
|
157255
157439
|
otherLiquidFiles,
|
|
@@ -157258,7 +157442,8 @@ function partitionThemeFiles(files) {
|
|
|
157258
157442
|
contextualizedJsonFiles,
|
|
157259
157443
|
otherJsonFiles,
|
|
157260
157444
|
configFiles,
|
|
157261
|
-
staticAssetFiles
|
|
157445
|
+
staticAssetFiles,
|
|
157446
|
+
blockLiquidFiles
|
|
157262
157447
|
};
|
|
157263
157448
|
}
|
|
157264
157449
|
function isTextFile(path) {
|
|
@@ -158227,6 +158412,7 @@ function orderFilesToBeDeleted(files) {
|
|
|
158227
158412
|
...fileSets.sectionJsonFiles,
|
|
158228
158413
|
...fileSets.otherJsonFiles,
|
|
158229
158414
|
...fileSets.sectionLiquidFiles,
|
|
158415
|
+
...fileSets.blockLiquidFiles,
|
|
158230
158416
|
...fileSets.otherLiquidFiles,
|
|
158231
158417
|
...fileSets.configFiles,
|
|
158232
158418
|
...fileSets.staticAssetFiles
|
|
@@ -158275,6 +158461,7 @@ function orderFilesToBeUploaded(files) {
|
|
|
158275
158461
|
independentFiles: [fileSets.otherLiquidFiles, fileSets.otherJsonFiles, fileSets.staticAssetFiles],
|
|
158276
158462
|
// Follow order of dependencies:
|
|
158277
158463
|
dependentFiles: [
|
|
158464
|
+
fileSets.blockLiquidFiles,
|
|
158278
158465
|
fileSets.sectionLiquidFiles,
|
|
158279
158466
|
fileSets.sectionJsonFiles,
|
|
158280
158467
|
fileSets.templateJsonFiles,
|
|
@@ -167044,43 +167231,45 @@ init_cjs_shims();
|
|
|
167044
167231
|
// ../app/dist/cli/services/generate-schema.js
|
|
167045
167232
|
init_cjs_shims();
|
|
167046
167233
|
async function generateSchemaService(options) {
|
|
167047
|
-
let { extension, stdout, developerPlatformClient, app } = options, apiKey = app.configuration.client_id, { api_version: version, type, targeting } = extension.configuration, definition = await (!!targeting?.length ? generateSchemaFromTarget({
|
|
167234
|
+
let { extension, stdout, developerPlatformClient, app, orgId } = options, apiKey = app.configuration.client_id, appId = app.configuration.app_id, { api_version: version, type, targeting } = extension.configuration, definition = await (!!targeting?.length ? generateSchemaFromTarget({
|
|
167048
167235
|
localIdentifier: extension.localIdentifier,
|
|
167049
167236
|
developerPlatformClient,
|
|
167050
167237
|
apiKey,
|
|
167238
|
+
appId,
|
|
167051
167239
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
167052
167240
|
target: targeting[0].target,
|
|
167053
|
-
version
|
|
167054
|
-
|
|
167241
|
+
version,
|
|
167242
|
+
orgId
|
|
167243
|
+
}) : generateSchemaFromApiType({
|
|
167055
167244
|
localIdentifier: extension.localIdentifier,
|
|
167056
167245
|
developerPlatformClient,
|
|
167057
167246
|
apiKey,
|
|
167247
|
+
appId,
|
|
167058
167248
|
type,
|
|
167059
|
-
version
|
|
167249
|
+
version,
|
|
167250
|
+
orgId
|
|
167060
167251
|
}));
|
|
167061
167252
|
if (stdout)
|
|
167062
167253
|
outputInfo(definition);
|
|
167063
167254
|
else {
|
|
167064
|
-
let outputPath = joinPath(
|
|
167255
|
+
let outputPath = joinPath(extension.directory, "schema.graphql");
|
|
167065
167256
|
await writeFile(outputPath, definition), outputInfo(`GraphQL Schema for ${extension.localIdentifier} written to ${outputPath}`);
|
|
167066
167257
|
}
|
|
167067
167258
|
}
|
|
167068
|
-
async function generateSchemaFromTarget({ localIdentifier, developerPlatformClient, apiKey, target, version }) {
|
|
167259
|
+
async function generateSchemaFromTarget({ localIdentifier, developerPlatformClient, appId, apiKey, target, version, orgId }) {
|
|
167069
167260
|
let variables = {
|
|
167070
|
-
|
|
167071
|
-
target,
|
|
167261
|
+
handle: target,
|
|
167072
167262
|
version
|
|
167073
|
-
}, definition = await developerPlatformClient.targetSchemaDefinition(variables);
|
|
167263
|
+
}, definition = await developerPlatformClient.targetSchemaDefinition(variables, apiKey, orgId, appId);
|
|
167074
167264
|
if (!definition)
|
|
167075
167265
|
throw new AbortError(outputContent`A schema could not be generated for ${localIdentifier}`, outputContent`Check that the Function targets and version are valid.`);
|
|
167076
167266
|
return definition;
|
|
167077
167267
|
}
|
|
167078
|
-
async function
|
|
167268
|
+
async function generateSchemaFromApiType({ localIdentifier, developerPlatformClient, apiKey, appId, version, type, orgId }) {
|
|
167079
167269
|
let variables = {
|
|
167080
|
-
apiKey,
|
|
167081
167270
|
version,
|
|
167082
167271
|
type
|
|
167083
|
-
}, definition = await developerPlatformClient.apiSchemaDefinition(variables);
|
|
167272
|
+
}, definition = await developerPlatformClient.apiSchemaDefinition(variables, apiKey, orgId, appId);
|
|
167084
167273
|
if (!definition)
|
|
167085
167274
|
throw new AbortError(outputContent`A schema could not be generated for ${localIdentifier}`, outputContent`Check that the Function API type and version are valid.`);
|
|
167086
167275
|
return definition;
|
|
@@ -167099,31 +167288,32 @@ var functionFlags = {
|
|
|
167099
167288
|
})
|
|
167100
167289
|
};
|
|
167101
167290
|
async function inFunctionContext({ path, userProvidedConfigName, apiKey, callback, reset }) {
|
|
167102
|
-
let { app, developerPlatformClient } = await linkedAppContext({
|
|
167291
|
+
let { app, developerPlatformClient, organization } = await linkedAppContext({
|
|
167103
167292
|
directory: path,
|
|
167104
167293
|
clientId: apiKey,
|
|
167105
167294
|
forceRelink: reset ?? !1,
|
|
167106
167295
|
userProvidedConfigName
|
|
167107
167296
|
}), allFunctions = app.allExtensions.filter((ext) => ext.isFunctionExtension), ourFunction = allFunctions.find((fun) => fun.directory === path);
|
|
167108
167297
|
if (ourFunction)
|
|
167109
|
-
return callback(app, developerPlatformClient, ourFunction);
|
|
167298
|
+
return callback(app, developerPlatformClient, ourFunction, organization.id);
|
|
167110
167299
|
if (isTerminalInteractive()) {
|
|
167111
167300
|
let selectedFunction = await renderAutocompletePrompt({
|
|
167112
167301
|
message: "Which function?",
|
|
167113
167302
|
choices: allFunctions.map((shopifyFunction) => ({ label: shopifyFunction.handle, value: shopifyFunction }))
|
|
167114
167303
|
});
|
|
167115
|
-
return callback(app, developerPlatformClient, selectedFunction);
|
|
167304
|
+
return callback(app, developerPlatformClient, selectedFunction, organization.id);
|
|
167116
167305
|
} else
|
|
167117
167306
|
throw new AbortError("Run this command from a function directory or use `--path` to specify a function directory.");
|
|
167118
167307
|
}
|
|
167119
|
-
async function getOrGenerateSchemaPath(extension, app, developerPlatformClient) {
|
|
167308
|
+
async function getOrGenerateSchemaPath(extension, app, developerPlatformClient, orgId) {
|
|
167120
167309
|
let path = joinPath(extension.directory, "schema.graphql");
|
|
167121
167310
|
return await fileExists(path) ? path : (await generateSchemaService({
|
|
167122
167311
|
app,
|
|
167123
167312
|
developerPlatformClient,
|
|
167124
167313
|
extension,
|
|
167125
167314
|
stdout: !1,
|
|
167126
|
-
path: extension.directory
|
|
167315
|
+
path: extension.directory,
|
|
167316
|
+
orgId
|
|
167127
167317
|
}), await fileExists(path) ? path : void 0);
|
|
167128
167318
|
}
|
|
167129
167319
|
|
|
@@ -167574,7 +167764,7 @@ var _a26, DEFAULT_FUNCTION_EXPORT = "_start", FunctionRun = class extends AppCom
|
|
|
167574
167764
|
userProvidedConfigName: flags.config,
|
|
167575
167765
|
apiKey: flags["client-id"],
|
|
167576
167766
|
reset: flags.reset,
|
|
167577
|
-
callback: async (app2, developerPlatformClient, ourFunction) => {
|
|
167767
|
+
callback: async (app2, developerPlatformClient, ourFunction, orgId) => {
|
|
167578
167768
|
let functionExport = DEFAULT_FUNCTION_EXPORT;
|
|
167579
167769
|
if (flags.export !== void 0)
|
|
167580
167770
|
outputDebug(`Using export ${flags.export} from the --export flag.`), functionExport = flags.export;
|
|
@@ -167593,7 +167783,7 @@ var _a26, DEFAULT_FUNCTION_EXPORT = "_start", FunctionRun = class extends AppCom
|
|
|
167593
167783
|
functionExport = targeting?.[0]?.export || DEFAULT_FUNCTION_EXPORT, outputDebug(`Using export '${functionExport}'. Use the --export flag or an interactive terminal to select a different export.`);
|
|
167594
167784
|
} else
|
|
167595
167785
|
outputDebug(`No targeting information found. Using the default export '${functionExport}'. Use the --export flag or an interactive terminal to select a different export.`);
|
|
167596
|
-
let inputQueryPath = ourFunction?.configuration.targeting?.[0]?.input_query, queryPath = inputQueryPath && `${ourFunction?.directory}/${inputQueryPath}`, schemaPath = await getOrGenerateSchemaPath(ourFunction, app2, developerPlatformClient);
|
|
167786
|
+
let inputQueryPath = ourFunction?.configuration.targeting?.[0]?.input_query, queryPath = inputQueryPath && `${ourFunction?.directory}/${inputQueryPath}`, schemaPath = await getOrGenerateSchemaPath(ourFunction, app2, developerPlatformClient, orgId);
|
|
167597
167787
|
return await runFunction({
|
|
167598
167788
|
functionExtension: ourFunction,
|
|
167599
167789
|
json: flags.json,
|
|
@@ -167643,12 +167833,13 @@ var _a27, FetchSchema = class extends AppCommand {
|
|
|
167643
167833
|
apiKey,
|
|
167644
167834
|
reset: flags.reset,
|
|
167645
167835
|
userProvidedConfigName: flags.config,
|
|
167646
|
-
callback: async (app2, developerPlatformClient, ourFunction) => (await generateSchemaService({
|
|
167836
|
+
callback: async (app2, developerPlatformClient, ourFunction, orgId) => (await generateSchemaService({
|
|
167647
167837
|
app: app2,
|
|
167648
167838
|
extension: ourFunction,
|
|
167649
167839
|
developerPlatformClient,
|
|
167650
167840
|
stdout: flags.stdout,
|
|
167651
|
-
path: flags.path
|
|
167841
|
+
path: flags.path,
|
|
167842
|
+
orgId
|
|
167652
167843
|
}), app2)
|
|
167653
167844
|
}) };
|
|
167654
167845
|
}
|
|
@@ -168302,11 +168493,10 @@ function buildTomlObject3(extension, _2, appConfiguration) {
|
|
|
168302
168493
|
extensions: [
|
|
168303
168494
|
{
|
|
168304
168495
|
type: "admin_link",
|
|
168305
|
-
name:
|
|
168496
|
+
name: config2.text,
|
|
168306
168497
|
handle: slugify(extension.title.substring(0, MAX_EXTENSION_HANDLE_LENGTH)),
|
|
168307
168498
|
targeting: [
|
|
168308
168499
|
{
|
|
168309
|
-
text: config2.text,
|
|
168310
168500
|
url: config2.url,
|
|
168311
168501
|
target: contextToTarget(context)
|
|
168312
168502
|
}
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
themeToken,
|
|
23
23
|
useEmbeddedThemeCLI,
|
|
24
24
|
useThemebundling
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5PUNFSIL.js";
|
|
26
26
|
import "./chunk-CQGOPQQH.js";
|
|
27
27
|
import "./chunk-SNOECVP4.js";
|
|
28
28
|
import "./chunk-522OB3EU.js";
|
|
@@ -58,4 +58,4 @@ export {
|
|
|
58
58
|
useEmbeddedThemeCLI,
|
|
59
59
|
useThemebundling
|
|
60
60
|
};
|
|
61
|
-
//# sourceMappingURL=local-
|
|
61
|
+
//# sourceMappingURL=local-U3MIEMYK.js.map
|
|
@@ -28,8 +28,8 @@ import {
|
|
|
28
28
|
versionSatisfies,
|
|
29
29
|
writePackageJSON,
|
|
30
30
|
yarnLockfile
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-WZKOQGWB.js";
|
|
32
|
+
import "./chunk-5PUNFSIL.js";
|
|
33
33
|
import "./chunk-CQGOPQQH.js";
|
|
34
34
|
import "./chunk-SNOECVP4.js";
|
|
35
35
|
import "./chunk-522OB3EU.js";
|
|
@@ -71,4 +71,4 @@ export {
|
|
|
71
71
|
writePackageJSON,
|
|
72
72
|
yarnLockfile
|
|
73
73
|
};
|
|
74
|
-
//# sourceMappingURL=node-package-manager-
|
|
74
|
+
//# sourceMappingURL=node-package-manager-UJ52MDKV.js.map
|