windmill-cli 1.760.0 → 1.761.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/esm/main.js +67 -42
- package/package.json +1 -1
package/esm/main.js
CHANGED
|
@@ -16784,7 +16784,7 @@ var init_OpenAPI = __esm(() => {
|
|
|
16784
16784
|
PASSWORD: undefined,
|
|
16785
16785
|
TOKEN: getEnv3("WM_TOKEN"),
|
|
16786
16786
|
USERNAME: undefined,
|
|
16787
|
-
VERSION: "1.
|
|
16787
|
+
VERSION: "1.761.0",
|
|
16788
16788
|
WITH_CREDENTIALS: true,
|
|
16789
16789
|
interceptors: {
|
|
16790
16790
|
request: new Interceptors,
|
|
@@ -17152,7 +17152,6 @@ __export(exports_services_gen, {
|
|
|
17152
17152
|
setFlowUserState: () => setFlowUserState,
|
|
17153
17153
|
setEnvironmentVariable: () => setEnvironmentVariable,
|
|
17154
17154
|
setEmailTriggerMode: () => setEmailTriggerMode,
|
|
17155
|
-
setDevWorkspaceLabel: () => setDevWorkspaceLabel,
|
|
17156
17155
|
setDefaultErrorOrRecoveryHandler: () => setDefaultErrorOrRecoveryHandler,
|
|
17157
17156
|
setCaptureConfig: () => setCaptureConfig,
|
|
17158
17157
|
setAzureTriggerMode: () => setAzureTriggerMode,
|
|
@@ -18239,16 +18238,6 @@ var backendVersion = () => {
|
|
|
18239
18238
|
workspace: data3.workspace
|
|
18240
18239
|
}
|
|
18241
18240
|
});
|
|
18242
|
-
}, setDevWorkspaceLabel = (data3) => {
|
|
18243
|
-
return request(OpenAPI, {
|
|
18244
|
-
method: "POST",
|
|
18245
|
-
url: "/w/{workspace}/workspaces/set_dev_workspace_label",
|
|
18246
|
-
path: {
|
|
18247
|
-
workspace: data3.workspace
|
|
18248
|
-
},
|
|
18249
|
-
body: data3.requestBody,
|
|
18250
|
-
mediaType: "application/json"
|
|
18251
|
-
});
|
|
18252
18241
|
}, existsWorkspace = (data3) => {
|
|
18253
18242
|
return request(OpenAPI, {
|
|
18254
18243
|
method: "POST",
|
|
@@ -20580,7 +20569,8 @@ var backendVersion = () => {
|
|
|
20580
20569
|
workspace: data3.workspace
|
|
20581
20570
|
},
|
|
20582
20571
|
query: {
|
|
20583
|
-
all_users: data3.allUsers
|
|
20572
|
+
all_users: data3.allUsers,
|
|
20573
|
+
compare_to_workspace: data3.compareToWorkspace
|
|
20584
20574
|
}
|
|
20585
20575
|
});
|
|
20586
20576
|
}, getDraftForUser = (data3) => {
|
|
@@ -21892,7 +21882,9 @@ var backendVersion = () => {
|
|
|
21892
21882
|
},
|
|
21893
21883
|
query: {
|
|
21894
21884
|
file_key: data3.fileKey,
|
|
21895
|
-
storage: data3.storage
|
|
21885
|
+
storage: data3.storage,
|
|
21886
|
+
sig: data3.sig,
|
|
21887
|
+
exp: data3.exp
|
|
21896
21888
|
}
|
|
21897
21889
|
});
|
|
21898
21890
|
}, appLoadFilePreview = (data3) => {
|
|
@@ -21911,7 +21903,9 @@ var backendVersion = () => {
|
|
|
21911
21903
|
csv_has_header: data3.csvHasHeader,
|
|
21912
21904
|
read_bytes_from: data3.readBytesFrom,
|
|
21913
21905
|
read_bytes_length: data3.readBytesLength,
|
|
21914
|
-
storage: data3.storage
|
|
21906
|
+
storage: data3.storage,
|
|
21907
|
+
sig: data3.sig,
|
|
21908
|
+
exp: data3.exp
|
|
21915
21909
|
}
|
|
21916
21910
|
});
|
|
21917
21911
|
}, appLoadParquetPreview = (data3) => {
|
|
@@ -21930,7 +21924,9 @@ var backendVersion = () => {
|
|
|
21930
21924
|
sort_desc: data3.sortDesc,
|
|
21931
21925
|
search_col: data3.searchCol,
|
|
21932
21926
|
search_term: data3.searchTerm,
|
|
21933
|
-
storage: data3.storage
|
|
21927
|
+
storage: data3.storage,
|
|
21928
|
+
sig: data3.sig,
|
|
21929
|
+
exp: data3.exp
|
|
21934
21930
|
}
|
|
21935
21931
|
});
|
|
21936
21932
|
}, appLoadCsvPreview = (data3) => {
|
|
@@ -21950,7 +21946,9 @@ var backendVersion = () => {
|
|
|
21950
21946
|
search_col: data3.searchCol,
|
|
21951
21947
|
search_term: data3.searchTerm,
|
|
21952
21948
|
storage: data3.storage,
|
|
21953
|
-
csv_separator: data3.csvSeparator
|
|
21949
|
+
csv_separator: data3.csvSeparator,
|
|
21950
|
+
sig: data3.sig,
|
|
21951
|
+
exp: data3.exp
|
|
21954
21952
|
}
|
|
21955
21953
|
});
|
|
21956
21954
|
}, appLoadTableCount = (data3) => {
|
|
@@ -21965,7 +21963,9 @@ var backendVersion = () => {
|
|
|
21965
21963
|
file_key: data3.fileKey,
|
|
21966
21964
|
search_col: data3.searchCol,
|
|
21967
21965
|
search_term: data3.searchTerm,
|
|
21968
|
-
storage: data3.storage
|
|
21966
|
+
storage: data3.storage,
|
|
21967
|
+
sig: data3.sig,
|
|
21968
|
+
exp: data3.exp
|
|
21969
21969
|
}
|
|
21970
21970
|
});
|
|
21971
21971
|
}, appDownloadS3ParquetFileAsCsv = (data3) => {
|
|
@@ -21978,7 +21978,9 @@ var backendVersion = () => {
|
|
|
21978
21978
|
},
|
|
21979
21979
|
query: {
|
|
21980
21980
|
file_key: data3.fileKey,
|
|
21981
|
-
storage: data3.storage
|
|
21981
|
+
storage: data3.storage,
|
|
21982
|
+
sig: data3.sig,
|
|
21983
|
+
exp: data3.exp
|
|
21982
21984
|
}
|
|
21983
21985
|
});
|
|
21984
21986
|
}, runFlowByPath = (data3) => {
|
|
@@ -25877,7 +25879,6 @@ __export(exports_gen, {
|
|
|
25877
25879
|
setFlowUserState: () => setFlowUserState,
|
|
25878
25880
|
setEnvironmentVariable: () => setEnvironmentVariable,
|
|
25879
25881
|
setEmailTriggerMode: () => setEmailTriggerMode,
|
|
25880
|
-
setDevWorkspaceLabel: () => setDevWorkspaceLabel,
|
|
25881
25882
|
setDefaultErrorOrRecoveryHandler: () => setDefaultErrorOrRecoveryHandler,
|
|
25882
25883
|
setCaptureConfig: () => setCaptureConfig,
|
|
25883
25884
|
setAzureTriggerMode: () => setAzureTriggerMode,
|
|
@@ -26666,7 +26667,7 @@ var init_auth = __esm(async () => {
|
|
|
26666
26667
|
});
|
|
26667
26668
|
|
|
26668
26669
|
// src/core/constants.ts
|
|
26669
|
-
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.
|
|
26670
|
+
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.761.0";
|
|
26670
26671
|
|
|
26671
26672
|
// src/utils/git.ts
|
|
26672
26673
|
var exports_git = {};
|
|
@@ -26747,22 +26748,28 @@ function isGitRepository() {
|
|
|
26747
26748
|
return false;
|
|
26748
26749
|
}
|
|
26749
26750
|
}
|
|
26750
|
-
function isForkWorkspace(workspaceId) {
|
|
26751
|
-
return workspaceId.startsWith(FORK_WORKSPACE_PREFIX);
|
|
26751
|
+
function isForkWorkspace(workspaceId, parentWorkspaceId) {
|
|
26752
|
+
return !!parentWorkspaceId || workspaceId.startsWith(FORK_WORKSPACE_PREFIX);
|
|
26752
26753
|
}
|
|
26753
|
-
function forkBranchName(workspaceId, originalBranch) {
|
|
26754
|
-
|
|
26754
|
+
function forkBranchName(workspaceId, originalBranch, devWorkspaceLabel) {
|
|
26755
|
+
if (devWorkspaceLabel) {
|
|
26756
|
+
return devWorkspaceLabel;
|
|
26757
|
+
}
|
|
26758
|
+
const branchPrefix = `${WM_FORK_PREFIX}/${originalBranch}/`;
|
|
26759
|
+
return workspaceId.startsWith(FORK_WORKSPACE_PREFIX) ? workspaceId.replace(FORK_WORKSPACE_PREFIX, branchPrefix) : `${branchPrefix}${workspaceId}`;
|
|
26755
26760
|
}
|
|
26756
26761
|
function computeGitSyncDeployBranch(params) {
|
|
26757
26762
|
const {
|
|
26758
26763
|
workspaceId,
|
|
26764
|
+
parentWorkspaceId,
|
|
26765
|
+
devWorkspaceLabel,
|
|
26759
26766
|
items,
|
|
26760
26767
|
useIndividualBranch,
|
|
26761
26768
|
groupByFolder,
|
|
26762
26769
|
clonedBranchName
|
|
26763
26770
|
} = params;
|
|
26764
|
-
if (workspaceId
|
|
26765
|
-
return forkBranchName(workspaceId, clonedBranchName);
|
|
26771
|
+
if (isForkWorkspace(workspaceId, parentWorkspaceId)) {
|
|
26772
|
+
return forkBranchName(workspaceId, clonedBranchName, devWorkspaceLabel);
|
|
26766
26773
|
}
|
|
26767
26774
|
if (items.length === 0)
|
|
26768
26775
|
return null;
|
|
@@ -69581,28 +69588,32 @@ async function pull(opts) {
|
|
|
69581
69588
|
process.exit(1);
|
|
69582
69589
|
}
|
|
69583
69590
|
const clonedBranchName = getCurrentGitBranch() ?? "main";
|
|
69584
|
-
const targetIsFork = isForkWorkspace(workspace.workspaceId);
|
|
69591
|
+
const targetIsFork = isForkWorkspace(workspace.workspaceId, opts.parentWorkspaceId);
|
|
69585
69592
|
const useIndividualBranch = targetIsFork ? false : !!opts.useIndividualBranch;
|
|
69586
69593
|
const groupByFolder = targetIsFork ? false : !!opts.groupByFolder;
|
|
69587
|
-
|
|
69588
|
-
|
|
69589
|
-
|
|
69590
|
-
|
|
69591
|
-
|
|
69592
|
-
|
|
69593
|
-
|
|
69594
|
-
|
|
69595
|
-
|
|
69596
|
-
checkoutGitSyncDeployBranch(parentBranch);
|
|
69597
|
-
}
|
|
69594
|
+
const parentBranch = opts.parentDevWorkspaceLabel ? opts.parentDevWorkspaceLabel : opts.parentWorkspaceId && isForkWorkspace(opts.parentWorkspaceId) ? computeGitSyncDeployBranch({
|
|
69595
|
+
workspaceId: opts.parentWorkspaceId,
|
|
69596
|
+
items: deployItems,
|
|
69597
|
+
useIndividualBranch,
|
|
69598
|
+
groupByFolder,
|
|
69599
|
+
clonedBranchName
|
|
69600
|
+
}) : null;
|
|
69601
|
+
if (parentBranch && parentBranch !== clonedBranchName) {
|
|
69602
|
+
checkoutGitSyncDeployBranch(parentBranch);
|
|
69598
69603
|
}
|
|
69599
69604
|
const deployBranch = computeGitSyncDeployBranch({
|
|
69600
69605
|
workspaceId: workspace.workspaceId,
|
|
69606
|
+
parentWorkspaceId: opts.parentWorkspaceId,
|
|
69607
|
+
devWorkspaceLabel: opts.devWorkspaceLabel,
|
|
69601
69608
|
items: deployItems,
|
|
69602
69609
|
useIndividualBranch,
|
|
69603
69610
|
groupByFolder,
|
|
69604
69611
|
clonedBranchName
|
|
69605
69612
|
});
|
|
69613
|
+
if (targetIsFork && deployBranch && deployBranch === clonedBranchName) {
|
|
69614
|
+
error(`Fork branch '${deployBranch}' equals the checked-out branch '${clonedBranchName}'; refusing to deploy a fork directly to the tracked branch. Use a different dev workspace label or tracked branch.`);
|
|
69615
|
+
process.exit(1);
|
|
69616
|
+
}
|
|
69606
69617
|
if (deployBranch && deployBranch !== clonedBranchName) {
|
|
69607
69618
|
checkoutGitSyncDeployBranch(deployBranch);
|
|
69608
69619
|
}
|
|
@@ -69859,7 +69870,7 @@ async function gitDeploy(opts) {
|
|
|
69859
69870
|
process.exit(1);
|
|
69860
69871
|
}
|
|
69861
69872
|
}
|
|
69862
|
-
const isFork = isForkWorkspace(opts.workspace ?? "");
|
|
69873
|
+
const isFork = isForkWorkspace(opts.workspace ?? "", opts.parentWorkspaceId);
|
|
69863
69874
|
const useIndividualBranch = isFork ? false : !!opts.useIndividualBranch;
|
|
69864
69875
|
const includes = deriveGitSyncDeployIncludes(items, useIndividualBranch);
|
|
69865
69876
|
const promotion = useIndividualBranch && !opts.promotion ? getCurrentGitBranch() ?? undefined : opts.promotion;
|
|
@@ -70946,7 +70957,7 @@ var init_sync = __esm(async () => {
|
|
|
70946
70957
|
aliasDuplicateObjects: false,
|
|
70947
70958
|
singleQuote: true
|
|
70948
70959
|
};
|
|
70949
|
-
command8 = new Command().description("sync local with a remote workspaces or the opposite (push or pull)").action(() => info("2 actions available, pull and push. Use -h to display help.")).command("pull").description("Pull any remote changes and apply them locally.").option("--yes", "Pull without needing confirmation").option("--dry-run", "Show changes that would be pulled without actually pushing").option("--plain-secrets", "Pull secrets as plain text").option("--json", "Use JSON instead of YAML").option("--skip-variables", "Skip syncing variables (including secrets)").option("--skip-secrets", "Skip syncing only secrets variables").option("--include-secrets", "Include secrets in sync (overrides skipSecrets in wmill.yaml)").option("--skip-resources", "Skip syncing resources").option("--skip-resource-types", "Skip syncing resource types").option("--skip-scripts", "Skip syncing scripts").option("--skip-flows", "Skip syncing flows").option("--skip-apps", "Skip syncing apps").option("--skip-folders", "Skip syncing folders").option("--skip-workspace-dependencies", "Skip syncing workspace dependencies").option("--include-schedules", "Include syncing schedules").option("--include-triggers", "Include syncing triggers").option("--include-users", "Include syncing users").option("--include-groups", "Include syncing groups").option("--include-settings", "Include syncing workspace settings").option("--include-key", "Include workspace encryption key").option("--skip-branch-validation", "Skip git branch validation and prompts").option("--json-output", "Output results in JSON format").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Overrides wmill.yaml includes").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account. Overrides wmill.yaml excludes").option("--extra-includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy").option("--repository <repo:string>", "Specify repository path (e.g., u/user/repo) when multiple repositories exist").option("--promotion <branch:string>", "Use promotionOverrides from the specified branch instead of regular overrides").option("--branch, --env <branch:string>", "[Deprecated: use --workspace] Override the current git branch/environment").action(pull).command("push").description("Push any local changes and apply them remotely.").option("--yes", "Push without needing confirmation").option("--dry-run", "Show changes that would be pushed without actually pushing").option("--plain-secrets", "Push secrets as plain text").option("--json", "Use JSON instead of YAML").option("--skip-variables", "Skip syncing variables (including secrets)").option("--skip-secrets", "Skip syncing only secrets variables").option("--include-secrets", "Include secrets in sync (overrides skipSecrets in wmill.yaml)").option("--skip-resources", "Skip syncing resources").option("--skip-resource-types", "Skip syncing resource types").option("--skip-scripts", "Skip syncing scripts").option("--skip-flows", "Skip syncing flows").option("--skip-apps", "Skip syncing apps").option("--skip-folders", "Skip syncing folders").option("--skip-workspace-dependencies", "Skip syncing workspace dependencies").option("--include-schedules", "Include syncing schedules").option("--include-triggers", "Include syncing triggers").option("--include-users", "Include syncing users").option("--include-groups", "Include syncing groups").option("--include-settings", "Include syncing workspace settings").option("--include-key", "Include workspace encryption key").option("--skip-reencrypt-on-key-change", "When the pushed encryption key differs from the remote, do NOT re-encrypt existing remote secrets. Only safe if they are already encrypted with the new key (e.g. workspace/instance migration). Default is to re-encrypt.").option("--skip-branch-validation", "Skip git branch validation and prompts").option("--json-output", "Output results in JSON format").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account.").option("--extra-includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy").option("--message <message:string>", "Include a message that will be added to all scripts/flows/apps updated during this push").option("--parallel <number>", "Number of changes to process in parallel").option("--repository <repo:string>", "Specify repository path (e.g., u/user/repo) when multiple repositories exist").option("--branch, --env <branch:string>", "[Deprecated: use --workspace] Override the current git branch/environment").option("--lint", "Run lint validation before pushing").option("--locks-required", "Fail if scripts or flow inline scripts that need locks have no locks").option("--auto-metadata", "Automatically regenerate stale metadata (locks and schemas) before pushing").option("--accept-overriding-permissioned-as-with-self", "Accept that items with a different permissioned_as will be updated with your own user").action(push4).command("git-deploy").hidden().description("Internal git-sync deployment-callback step (used by the git-sync hub script). Runs inside an existing clone: switches to the wm_deploy/fork branch when applicable, pulls workspace content, then commits and pushes.").option("--repository <repo:string>", "Repository resource path (e.g. u/user/repo)").option("--git-deploy-items <json:string>", "JSON array of {path_type,path,parent_path,commit_msg} being deployed").option("--use-individual-branch", "Push each deployed object to its own wm_deploy/<workspace>/<...> branch").option("--group-by-folder", "With --use-individual-branch, group deployed objects per folder branch").option("--only-create-branch", "Only create/push the deploy branch, skip pulling and committing files").option("--parent-workspace-id <id:string>", "Parent workspace id, used to root a fork-of-a-fork branch").option("--skip-secrets", "Skip syncing only secrets variables").option("--git-committer-email <email:string>", "Committer email for the deploy commit (GPG-signed repos pass the GPG key email; defaults to WM_EMAIL)").option("--git-committer-name <name:string>", "Committer name for the deploy commit (defaults to WM_USERNAME)").action(gitDeploy);
|
|
70960
|
+
command8 = new Command().description("sync local with a remote workspaces or the opposite (push or pull)").action(() => info("2 actions available, pull and push. Use -h to display help.")).command("pull").description("Pull any remote changes and apply them locally.").option("--yes", "Pull without needing confirmation").option("--dry-run", "Show changes that would be pulled without actually pushing").option("--plain-secrets", "Pull secrets as plain text").option("--json", "Use JSON instead of YAML").option("--skip-variables", "Skip syncing variables (including secrets)").option("--skip-secrets", "Skip syncing only secrets variables").option("--include-secrets", "Include secrets in sync (overrides skipSecrets in wmill.yaml)").option("--skip-resources", "Skip syncing resources").option("--skip-resource-types", "Skip syncing resource types").option("--skip-scripts", "Skip syncing scripts").option("--skip-flows", "Skip syncing flows").option("--skip-apps", "Skip syncing apps").option("--skip-folders", "Skip syncing folders").option("--skip-workspace-dependencies", "Skip syncing workspace dependencies").option("--include-schedules", "Include syncing schedules").option("--include-triggers", "Include syncing triggers").option("--include-users", "Include syncing users").option("--include-groups", "Include syncing groups").option("--include-settings", "Include syncing workspace settings").option("--include-key", "Include workspace encryption key").option("--skip-branch-validation", "Skip git branch validation and prompts").option("--json-output", "Output results in JSON format").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Overrides wmill.yaml includes").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account. Overrides wmill.yaml excludes").option("--extra-includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy").option("--repository <repo:string>", "Specify repository path (e.g., u/user/repo) when multiple repositories exist").option("--promotion <branch:string>", "Use promotionOverrides from the specified branch instead of regular overrides").option("--branch, --env <branch:string>", "[Deprecated: use --workspace] Override the current git branch/environment").action(pull).command("push").description("Push any local changes and apply them remotely.").option("--yes", "Push without needing confirmation").option("--dry-run", "Show changes that would be pushed without actually pushing").option("--plain-secrets", "Push secrets as plain text").option("--json", "Use JSON instead of YAML").option("--skip-variables", "Skip syncing variables (including secrets)").option("--skip-secrets", "Skip syncing only secrets variables").option("--include-secrets", "Include secrets in sync (overrides skipSecrets in wmill.yaml)").option("--skip-resources", "Skip syncing resources").option("--skip-resource-types", "Skip syncing resource types").option("--skip-scripts", "Skip syncing scripts").option("--skip-flows", "Skip syncing flows").option("--skip-apps", "Skip syncing apps").option("--skip-folders", "Skip syncing folders").option("--skip-workspace-dependencies", "Skip syncing workspace dependencies").option("--include-schedules", "Include syncing schedules").option("--include-triggers", "Include syncing triggers").option("--include-users", "Include syncing users").option("--include-groups", "Include syncing groups").option("--include-settings", "Include syncing workspace settings").option("--include-key", "Include workspace encryption key").option("--skip-reencrypt-on-key-change", "When the pushed encryption key differs from the remote, do NOT re-encrypt existing remote secrets. Only safe if they are already encrypted with the new key (e.g. workspace/instance migration). Default is to re-encrypt.").option("--skip-branch-validation", "Skip git branch validation and prompts").option("--json-output", "Output results in JSON format").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which file to NOT take into account.").option("--extra-includes <patterns:file[]>", "Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string). Useful to still take wmill.yaml into account and act as a second pattern to satisfy").option("--message <message:string>", "Include a message that will be added to all scripts/flows/apps updated during this push").option("--parallel <number>", "Number of changes to process in parallel").option("--repository <repo:string>", "Specify repository path (e.g., u/user/repo) when multiple repositories exist").option("--branch, --env <branch:string>", "[Deprecated: use --workspace] Override the current git branch/environment").option("--lint", "Run lint validation before pushing").option("--locks-required", "Fail if scripts or flow inline scripts that need locks have no locks").option("--auto-metadata", "Automatically regenerate stale metadata (locks and schemas) before pushing").option("--accept-overriding-permissioned-as-with-self", "Accept that items with a different permissioned_as will be updated with your own user").action(push4).command("git-deploy").hidden().description("Internal git-sync deployment-callback step (used by the git-sync hub script). Runs inside an existing clone: switches to the wm_deploy/fork branch when applicable, pulls workspace content, then commits and pushes.").option("--repository <repo:string>", "Repository resource path (e.g. u/user/repo)").option("--git-deploy-items <json:string>", "JSON array of {path_type,path,parent_path,commit_msg} being deployed").option("--use-individual-branch", "Push each deployed object to its own wm_deploy/<workspace>/<...> branch").option("--group-by-folder", "With --use-individual-branch, group deployed objects per folder branch").option("--only-create-branch", "Only create/push the deploy branch, skip pulling and committing files").option("--parent-workspace-id <id:string>", "Parent workspace id, used to root a fork-of-a-fork branch").option("--dev-workspace-label <label:string>", "Environment label of a dev workspace (dev/staging); its deploys go to that branch").option("--parent-dev-workspace-label <label:string>", "Environment label of the parent dev workspace; roots a fork-of-dev branch on it").option("--skip-secrets", "Skip syncing only secrets variables").option("--git-committer-email <email:string>", "Committer email for the deploy commit (GPG-signed repos pass the GPG key email; defaults to WM_EMAIL)").option("--git-committer-name <name:string>", "Committer name for the deploy commit (defaults to WM_USERNAME)").action(gitDeploy);
|
|
70950
70961
|
sync_default = command8;
|
|
70951
70962
|
});
|
|
70952
70963
|
|
|
@@ -86097,7 +86108,21 @@ A raw app has three logical parts:
|
|
|
86097
86108
|
|
|
86098
86109
|
### Entrypoint
|
|
86099
86110
|
|
|
86100
|
-
\`index.tsx\` is the bundling entrypoint
|
|
86111
|
+
The entrypoint is \`index.tsx\` for React and \`index.ts\` for Svelte and Vue. It is both the bundling entrypoint (the bundler is esbuild) and the **mount** entrypoint: the preview executes the bundle against an empty \`<div id="root">\` and auto-renders nothing, so the entrypoint must mount a top-level \`App\` itself. Keep the UI in \`App.tsx\` / \`App.svelte\` / \`App.vue\` and keep the entrypoint as the mount shim.
|
|
86112
|
+
|
|
86113
|
+
React (\`index.tsx\`):
|
|
86114
|
+
|
|
86115
|
+
\`\`\`tsx
|
|
86116
|
+
import React from 'react'
|
|
86117
|
+
import { createRoot } from 'react-dom/client'
|
|
86118
|
+
import App from './App'
|
|
86119
|
+
|
|
86120
|
+
createRoot(document.getElementById('root')!).render(<App />)
|
|
86121
|
+
\`\`\`
|
|
86122
|
+
|
|
86123
|
+
Svelte (\`index.ts\`): \`mount(App, { target: document.getElementById('root')! })\`. Vue (\`index.ts\`): \`createApp(App).mount('#root')\`.
|
|
86124
|
+
|
|
86125
|
+
**Never replace the entrypoint with a bare component** (\`export default function App() { ... }\` and no mount call). A component that is defined but never mounted renders a blank screen with **no error thrown** — it never executes, so nothing reaches the console or the error overlay. If an app renders blank, check that the entrypoint still mounts \`App\` into \`#root\`.
|
|
86101
86126
|
|
|
86102
86127
|
**Always begin every React file (\`.tsx\`/\`.jsx\`) that uses JSX with \`import React from 'react'\`.** esbuild uses the classic JSX transform, so \`React\` must be in scope wherever JSX appears — a missing import compiles fine but throws \`React is not defined\` at runtime, leaving a blank screen.
|
|
86103
86128
|
|