@gadgetinc/ggt 1.7.4 → 2.3.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/README.md +167 -31
- package/dist/{add-KJLV4API.js → add-7MLI3TCY.js} +10 -9
- package/dist/add-7MLI3TCY.js.map +7 -0
- package/dist/agent-plugin-543K6WBH.js +11 -0
- package/dist/agent-plugin-543K6WBH.js.map +7 -0
- package/dist/chunk-2HJS3KFB.js +2 -0
- package/dist/{chunk-J2OYMAMD.js.map → chunk-2HJS3KFB.js.map} +2 -2
- package/dist/chunk-3WKH3DJL.js +2 -0
- package/dist/chunk-3WKH3DJL.js.map +7 -0
- package/dist/chunk-577KP32Z.js +8 -0
- package/dist/chunk-577KP32Z.js.map +7 -0
- package/dist/chunk-6FVHOLT7.js +28 -0
- package/dist/chunk-6FVHOLT7.js.map +7 -0
- package/dist/chunk-72J7X5LR.js +2 -0
- package/dist/chunk-72J7X5LR.js.map +7 -0
- package/dist/chunk-ALSXPCRD.js +118 -0
- package/dist/chunk-ALSXPCRD.js.map +7 -0
- package/dist/chunk-CNNOPE5K.js +69 -0
- package/dist/chunk-CNNOPE5K.js.map +7 -0
- package/dist/chunk-ETKWDO4V.js +2 -0
- package/dist/chunk-ETKWDO4V.js.map +7 -0
- package/dist/chunk-F6BGQ4LG.js +11 -0
- package/dist/chunk-F6BGQ4LG.js.map +7 -0
- package/dist/chunk-FE5O5VX4.js +2 -0
- package/dist/chunk-FE5O5VX4.js.map +7 -0
- package/dist/chunk-GJGBTM5Y.js +2 -0
- package/dist/chunk-GJGBTM5Y.js.map +7 -0
- package/dist/chunk-GZTHIOXS.js +2 -0
- package/dist/chunk-GZTHIOXS.js.map +7 -0
- package/dist/chunk-IQSZEOYY.js +283 -0
- package/dist/chunk-IQSZEOYY.js.map +7 -0
- package/dist/chunk-J232VCIM.js +2 -0
- package/dist/chunk-J232VCIM.js.map +7 -0
- package/dist/{chunk-SX5LO3XQ.js → chunk-KKIL22RY.js} +1 -1
- package/dist/{chunk-SX5LO3XQ.js.map → chunk-KKIL22RY.js.map} +1 -1
- package/dist/chunk-L2XBSR7G.js +2 -0
- package/dist/chunk-L2XBSR7G.js.map +7 -0
- package/dist/chunk-N5FFICAP.js +9 -0
- package/dist/chunk-N5FFICAP.js.map +7 -0
- package/dist/chunk-TGCJ6TMW.js +10 -0
- package/dist/chunk-TGCJ6TMW.js.map +7 -0
- package/dist/chunk-ULJYEUQG.js +113 -0
- package/dist/chunk-ULJYEUQG.js.map +7 -0
- package/dist/chunk-UVVKKUYG.js +10 -0
- package/dist/chunk-UVVKKUYG.js.map +7 -0
- package/dist/{chunk-JSGXXXFU.js → chunk-WZ2PO6H2.js} +6 -6
- package/dist/{chunk-JSGXXXFU.js.map → chunk-WZ2PO6H2.js.map} +3 -3
- package/dist/chunk-X4XSYLCE.js +12 -0
- package/dist/chunk-X4XSYLCE.js.map +7 -0
- package/dist/chunk-ZYDMXS5R.js +6 -0
- package/dist/chunk-ZYDMXS5R.js.map +7 -0
- package/dist/{configure-CXY6JQB7.js → configure-PYRXYNGZ.js} +2 -2
- package/dist/debugger-VKLUEWIN.js +41 -0
- package/dist/debugger-VKLUEWIN.js.map +7 -0
- package/dist/deploy-JCREEGBA.js +25 -0
- package/dist/deploy-JCREEGBA.js.map +7 -0
- package/dist/dev-Y2GLI7EH.js +59 -0
- package/dist/dev-Y2GLI7EH.js.map +7 -0
- package/dist/env-5OPHX3MC.js +135 -0
- package/dist/env-5OPHX3MC.js.map +7 -0
- package/dist/esm-3JVXH7DT.js +37 -0
- package/dist/esm-3JVXH7DT.js.map +7 -0
- package/dist/eval-LZPZ6PBQ.js +54 -0
- package/dist/eval-LZPZ6PBQ.js.map +7 -0
- package/dist/getMachineId-bsd-QUXN4NKS.js +2 -0
- package/dist/getMachineId-bsd-QUXN4NKS.js.map +7 -0
- package/dist/getMachineId-darwin-TCXBAX22.js +3 -0
- package/dist/getMachineId-darwin-TCXBAX22.js.map +7 -0
- package/dist/getMachineId-linux-IJ3LYIOX.js +2 -0
- package/dist/getMachineId-linux-IJ3LYIOX.js.map +7 -0
- package/dist/getMachineId-unsupported-IKXBUCYY.js +2 -0
- package/dist/getMachineId-unsupported-IKXBUCYY.js.map +7 -0
- package/dist/getMachineId-win-6CX7VSFF.js +2 -0
- package/dist/getMachineId-win-6CX7VSFF.js.map +7 -0
- package/dist/ggt-KUAF6WUA.js +45 -0
- package/dist/ggt-KUAF6WUA.js.map +7 -0
- package/dist/{list-3QZTSHQV.js → list-IANT7SNF.js} +2 -2
- package/dist/login-TYRZLN5S.js +2 -0
- package/dist/{logout-SWWGI27Q.js → logout-P75XYYZ6.js} +2 -2
- package/dist/logs-SBMD6JSR.js +28 -0
- package/dist/logs-SBMD6JSR.js.map +7 -0
- package/dist/main.js +1 -43
- package/dist/main.js.map +4 -4
- package/dist/{open-J2ZVNVJ6.js → open-JPAMII4K.js} +11 -11
- package/dist/open-JPAMII4K.js.map +7 -0
- package/dist/problems-EZRSHLZT.js +14 -0
- package/dist/problems-EZRSHLZT.js.map +7 -0
- package/dist/pull-R3PMBVOT.js +28 -0
- package/dist/pull-R3PMBVOT.js.map +7 -0
- package/dist/push-5XEEESQQ.js +2 -0
- package/dist/status-RJN5ES6S.js +14 -0
- package/dist/status-RJN5ES6S.js.map +7 -0
- package/dist/update-X7YS3MNH.js +2 -0
- package/dist/update-X7YS3MNH.js.map +7 -0
- package/dist/var-PC6KQUPF.js +159 -0
- package/dist/var-PC6KQUPF.js.map +7 -0
- package/dist/{version-NZHW3VLV.js → version-GZJOU2CV.js} +2 -2
- package/dist/{whoami-MIJFO4MW.js → whoami-GKPGPZ3B.js} +2 -2
- package/package.json +64 -74
- package/dist/add-KJLV4API.js.map +0 -7
- package/dist/chunk-24OT7GHO.js +0 -65
- package/dist/chunk-24OT7GHO.js.map +0 -7
- package/dist/chunk-HN3YKQ3C.js +0 -6
- package/dist/chunk-HN3YKQ3C.js.map +0 -7
- package/dist/chunk-J2OYMAMD.js +0 -2
- package/dist/chunk-JBY5A44K.js +0 -7
- package/dist/chunk-JBY5A44K.js.map +0 -7
- package/dist/chunk-L5H5T2T6.js +0 -66
- package/dist/chunk-L5H5T2T6.js.map +0 -7
- package/dist/chunk-M6L2X3GX.js +0 -194
- package/dist/chunk-M6L2X3GX.js.map +0 -7
- package/dist/chunk-MHTXRD5G.js +0 -2
- package/dist/chunk-MHTXRD5G.js.map +0 -7
- package/dist/chunk-OIVNACS7.js +0 -12
- package/dist/chunk-OIVNACS7.js.map +0 -7
- package/dist/chunk-QXWICGG6.js +0 -2
- package/dist/chunk-QXWICGG6.js.map +0 -7
- package/dist/chunk-WNAYBYSG.js +0 -8
- package/dist/chunk-WNAYBYSG.js.map +0 -7
- package/dist/chunk-X47UA3VR.js +0 -2
- package/dist/chunk-X47UA3VR.js.map +0 -7
- package/dist/chunk-XGQQOMPO.js +0 -2
- package/dist/chunk-XGQQOMPO.js.map +0 -7
- package/dist/chunk-XKYYKHP4.js +0 -28
- package/dist/chunk-XKYYKHP4.js.map +0 -7
- package/dist/chunk-YU6P3ESA.js +0 -121
- package/dist/chunk-YU6P3ESA.js.map +0 -7
- package/dist/deploy-XFZBJJWP.js +0 -25
- package/dist/deploy-XFZBJJWP.js.map +0 -7
- package/dist/dev-GG6TU3DJ.js +0 -59
- package/dist/dev-GG6TU3DJ.js.map +0 -7
- package/dist/esm-PLVGBDRY.js +0 -38
- package/dist/esm-PLVGBDRY.js.map +0 -7
- package/dist/login-HKGCVIWO.js +0 -2
- package/dist/logs-DW4PH3U6.js +0 -28
- package/dist/logs-DW4PH3U6.js.map +0 -7
- package/dist/open-J2ZVNVJ6.js.map +0 -7
- package/dist/pull-ORNQFSFG.js +0 -28
- package/dist/pull-ORNQFSFG.js.map +0 -7
- package/dist/push-KMZZ6JJL.js +0 -2
- package/dist/status-JAREJZ4X.js +0 -14
- package/dist/status-JAREJZ4X.js.map +0 -7
- /package/dist/{configure-CXY6JQB7.js.map → configure-PYRXYNGZ.js.map} +0 -0
- /package/dist/{list-3QZTSHQV.js.map → list-IANT7SNF.js.map} +0 -0
- /package/dist/{login-HKGCVIWO.js.map → login-TYRZLN5S.js.map} +0 -0
- /package/dist/{logout-SWWGI27Q.js.map → logout-P75XYYZ6.js.map} +0 -0
- /package/dist/{push-KMZZ6JJL.js.map → push-5XEEESQQ.js.map} +0 -0
- /package/dist/{version-NZHW3VLV.js.map → version-GZJOU2CV.js.map} +0 -0
- /package/dist/{whoami-MIJFO4MW.js.map → whoami-GKPGPZ3B.js.map} +0 -0
package/dist/login-HKGCVIWO.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as a,s as b,t as c}from"./chunk-L5H5T2T6.js";import"./chunk-X47UA3VR.js";import"./chunk-XGQQOMPO.js";import"./chunk-OIVNACS7.js";import"./chunk-24OT7GHO.js";import"./chunk-GFQYFEEH.js";import"./chunk-7DYQUG5M.js";export{c as login,b as run,a as usage};
|
|
2
|
-
//# sourceMappingURL=login-HKGCVIWO.js.map
|
package/dist/logs-DW4PH3U6.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{p as m}from"./chunk-M6L2X3GX.js";import{m as a,n as l,o as p}from"./chunk-YU6P3ESA.js";import"./chunk-JSGXXXFU.js";import"./chunk-WNAYBYSG.js";import{c as g}from"./chunk-J2OYMAMD.js";import"./chunk-JBY5A44K.js";import"./chunk-HN3YKQ3C.js";import{E as i}from"./chunk-L5H5T2T6.js";import"./chunk-X47UA3VR.js";import"./chunk-XGQQOMPO.js";import"./chunk-OIVNACS7.js";import{ha as r}from"./chunk-24OT7GHO.js";import"./chunk-GFQYFEEH.js";import{a as n,h as s}from"./chunk-7DYQUG5M.js";s();var b={...a,...i},w=n(o=>r`
|
|
2
|
-
Streams the logs for an application to.
|
|
3
|
-
|
|
4
|
-
{gray Usage}
|
|
5
|
-
ggt logs [options]
|
|
6
|
-
|
|
7
|
-
{gray Options}
|
|
8
|
-
-ll, --log-level <level> Sets the log level for incoming application logs (default: info)
|
|
9
|
-
--my-logs Only outputs user sourced logs and exclude logs from the Gadget framework
|
|
10
|
-
--json Output logs in JSON format
|
|
11
|
-
-a, --app <app_name> Selects the app to pull your environment changes from. Default set on ".gadget/sync.json"
|
|
12
|
-
-e, --env, --from <env_name> Selects the environment to pull changes from. Default set on ".gadget/sync.json"
|
|
13
|
-
|
|
14
|
-
{gray Examples}
|
|
15
|
-
Stream all user logs from your development environment
|
|
16
|
-
{cyanBright $ ggt logs --env development --my-logs}
|
|
17
|
-
|
|
18
|
-
Stream all logs from your production environment in JSON format
|
|
19
|
-
{cyanBright $ ggt logs --env production --json}
|
|
20
|
-
`,"usage"),D=n(async(o,t)=>{if(t._.length>0)throw new g(r`
|
|
21
|
-
"ggt logs" does not take any positional arguments.
|
|
22
|
-
|
|
23
|
-
If you are trying to print logs for an app in specific directory,
|
|
24
|
-
you must "cd" to that directory and then run "ggt logs".
|
|
25
|
-
|
|
26
|
-
Run "ggt logs -h" for more information.
|
|
27
|
-
`);let c=await p(process.cwd()),u=await l.loadOrInit(o,{command:"pull",args:t,directory:c}),f=new m(u).subscribeToEnvironmentLogs(t,{onError:n(e=>{o.abort(e)},"onError")});o.onAbort(e=>{o.log.info("stopping",{reason:e}),f.unsubscribe()})},"run");export{b as args,D as run,w as usage};
|
|
28
|
-
//# sourceMappingURL=logs-DW4PH3U6.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/commands/logs.ts"],
|
|
4
|
-
"sourcesContent": ["import { ArgError, type ArgsDefinition, type ArgsDefinitionResult } from \"../services/command/arg.js\";\nimport type { Run, Usage } from \"../services/command/command.js\";\nimport { FileSync } from \"../services/filesync/filesync.js\";\nimport { SyncJson, SyncJsonArgs, loadSyncJsonDirectory } from \"../services/filesync/sync-json.js\";\nimport { LoggingArgs } from \"../services/output/log/structured.js\";\nimport { sprint } from \"../services/output/sprint.js\";\n\nexport type LogsArgs = typeof args;\nexport type LogsArgsResult = ArgsDefinitionResult<LogsArgs>;\n\nexport const args = {\n ...SyncJsonArgs,\n ...LoggingArgs,\n} satisfies ArgsDefinition;\n\nexport const usage: Usage = (_ctx) => {\n return sprint`\n Streams the logs for an application to.\n\n {gray Usage}\n ggt logs [options]\n\n {gray Options}\n -ll, --log-level <level> Sets the log level for incoming application logs (default: info)\n --my-logs Only outputs user sourced logs and exclude logs from the Gadget framework\n --json Output logs in JSON format\n -a, --app <app_name> Selects the app to pull your environment changes from. Default set on \".gadget/sync.json\"\n -e, --env, --from <env_name> Selects the environment to pull changes from. Default set on \".gadget/sync.json\"\n\n {gray Examples}\n Stream all user logs from your development environment\n {cyanBright $ ggt logs --env development --my-logs}\n\n Stream all logs from your production environment in JSON format\n {cyanBright $ ggt logs --env production --json}\n `;\n};\n\nexport const run: Run<LogsArgs> = async (ctx, args) => {\n if (args._.length > 0) {\n throw new ArgError(sprint`\n \"ggt logs\" does not take any positional arguments.\n\n If you are trying to print logs for an app in specific directory,\n you must \"cd\" to that directory and then run \"ggt logs\".\n\n Run \"ggt logs -h\" for more information.\n `);\n }\n\n const directory = await loadSyncJsonDirectory(process.cwd());\n const syncJson = await SyncJson.loadOrInit(ctx, { command: \"pull\", args, directory });\n const filesync = new FileSync(syncJson);\n\n const logsSubscription = filesync.subscribeToEnvironmentLogs(args, {\n onError: (error) => {\n ctx.abort(error);\n },\n });\n\n ctx.onAbort((reason) => {\n ctx.log.info(\"stopping\", { reason });\n logsSubscription.unsubscribe();\n });\n};\n"],
|
|
5
|
-
"mappings": "seAAAA,IAUO,IAAMC,EAAO,CAClB,GAAGC,EACH,GAAGC,CACL,EAEaC,EAAeC,EAACC,GACpBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IADmB,SAuBfC,EAAqBH,EAAA,MAAOI,EAAKR,IAAS,CACrD,GAAIA,EAAK,EAAE,OAAS,EAClB,MAAM,IAAIS,EAASH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOlB,EAGH,IAAMI,EAAY,MAAMC,EAAsB,QAAQ,IAAI,CAAC,EACrDC,EAAW,MAAMC,EAAS,WAAWL,EAAK,CAAE,QAAS,OAAQ,KAAAR,EAAM,UAAAU,CAAU,CAAC,EAG9EI,EAFW,IAAIC,EAASH,CAAQ,EAEJ,2BAA2BZ,EAAM,CACjE,QAASI,EAACY,GAAU,CAClBR,EAAI,MAAMQ,CAAK,CACjB,EAFS,UAGX,CAAC,EAEDR,EAAI,QAASS,GAAW,CACtBT,EAAI,IAAI,KAAK,WAAY,CAAE,OAAAS,CAAO,CAAC,EACnCH,EAAiB,YAAY,CAC/B,CAAC,CACH,EA1BkC",
|
|
6
|
-
"names": ["init_cjs", "args", "SyncJsonArgs", "LoggingArgs", "usage", "__name", "_ctx", "sprint", "run", "ctx", "ArgError", "directory", "loadSyncJsonDirectory", "syncJson", "SyncJson", "logsSubscription", "FileSync", "error", "reason"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/commands/open.ts"],
|
|
4
|
-
"sourcesContent": ["import open from \"open\";\nimport { getModels } from \"../services/app/app.js\";\nimport { ArgError } from \"../services/command/arg.js\";\nimport type { Run, Usage } from \"../services/command/command.js\";\nimport { UnknownDirectoryError } from \"../services/filesync/error.js\";\nimport { SyncJson, SyncJsonArgs, loadSyncJsonDirectory } from \"../services/filesync/sync-json.js\";\nimport { println } from \"../services/output/print.js\";\nimport { select } from \"../services/output/select.js\";\nimport { sprint } from \"../services/output/sprint.js\";\nimport { sortBySimilar } from \"../services/util/collection.js\";\nimport { isNever } from \"../services/util/is.js\";\n\nexport type OpenArgs = typeof args;\n\nexport const args = {\n ...SyncJsonArgs,\n \"--show-all\": { type: Boolean },\n};\n\nexport const usage: Usage = (_ctx) => {\n return sprint`\n This command opens a specific Gadget page in your browser, allowing you to directly access\n various parts of your application's interface such as logs, permissions, data views, or\n schemas.\n\n {gray Usage}\n ggt open [LOCATION] [model_name] [--show-all] [options]\n\n LOCATION: specifies the part of Gadget to open, by default it'll open the apps home page:\n\n + logs Opens logs\n + permissions Opens permissions\n + data Opens data editor for a specific model\n + schema Opens schema editor for a specific model\n\n {gray Options}\n -a, --app <app_name> Selects the application to open in your browser. Default set on \".gadget/sync.json\"\n -e, --env <env_name> Selects the environment to open in your browser. Default set on \".gadget/sync.json\"\n --show-all Shows all schema, or data options by listing your available models\n\n {gray Examples}\n Opens editor home\n {cyanBright $ ggt open}\n\n Opens logs\n {cyanBright $ ggt open logs}\n\n Opens permissions\n {cyanBright $ ggt open permissions}\n\n Opens data editor for the 'post' model\n {cyanBright $ ggt open data post}\n\n Opens schema for 'post' model\n {cyanBright $ ggt open schema post}\n\n Shows all models available in the data editor\n {cyanBright $ ggt open data -show-all}\n\n Shows all models available in the schema viewer\n {cyanBright $ ggt open schema --show-all}\n\n Opens data editor for 'post' model of app 'myBlog' in the 'staging' environment\n {cyanBright $ ggt open data post --app myBlog --env staging}\n `;\n};\n\nexport const run: Run<OpenArgs> = async (ctx, args) => {\n const directory = await loadSyncJsonDirectory(process.cwd());\n const syncJson = await SyncJson.load(ctx, { command: \"open\", args, directory });\n if (!syncJson) {\n throw new UnknownDirectoryError({ command: \"open\", args, directory });\n }\n\n const location = args._[0] as Location | undefined;\n if (!location) {\n await open(`https://${syncJson.environment.application.primaryDomain}/edit/${syncJson.environment.name}`);\n println`\n Opened editor for environment {cyanBright ${syncJson.environment.name}}.\n `;\n return;\n }\n\n if (!Locations.includes(location)) {\n const [closest] = sortBySimilar(location, Locations);\n throw new ArgError(sprint`\n Unknown location {yellow ${location}}\n\n Did you mean {blueBright ${closest}}?\n\n Run \"ggt open --help\" for usage\n `);\n }\n\n switch (location) {\n case \"logs\": {\n await open(`https://${syncJson.environment.application.primaryDomain}/edit/${syncJson.environment.name}/logs`);\n println`\n Opened log viewer for environment {cyanBright ${syncJson.environment.name}}.\n `;\n break;\n }\n case \"permissions\": {\n await open(`https://${syncJson.environment.application.primaryDomain}/edit/${syncJson.environment.name}/settings/permissions`);\n println`\n Opened permissions settings for environment {cyanBright ${syncJson.environment.name}}.\n `;\n break;\n }\n case \"data\":\n case \"schema\": {\n const view = args._[0];\n const remoteModelApiIdentifiers = (await getModels(ctx, syncJson.environment)).map((e) => e.apiIdentifier);\n\n let modelApiIdentifier = args._[1];\n if (!modelApiIdentifier) {\n if (args[\"--show-all\"]) {\n modelApiIdentifier = await select({ choices: remoteModelApiIdentifiers, content: \"Which model do you wish to open?\" });\n } else {\n throw new ArgError(sprint`\n \"ggt open ${view}\" requires a model to be specified.\n\n Run with \"--show-all\" to choose from available models.\n\n ggt open ${view} --show-all\n `);\n }\n }\n\n if (!remoteModelApiIdentifiers.includes(modelApiIdentifier)) {\n const [closest] = sortBySimilar(modelApiIdentifier, remoteModelApiIdentifiers);\n throw new ArgError(sprint`\n Unknown model {yellow ${modelApiIdentifier}}\n\n Did you mean {blueBright ${closest}}?\n\n Run with \"--show-all\" to choose from available models.\n\n ggt open ${view} --show-all\n `);\n }\n\n await open(\n `https://${syncJson.environment.application.primaryDomain}/edit/${syncJson.environment.name}/model/${modelApiIdentifier}/${view}`,\n );\n println`\n Opened ${view} viewer for environment {cyanBright ${syncJson.environment.name}} for model {cyanBright ${modelApiIdentifier}}.\n `;\n break;\n }\n default:\n isNever(location);\n }\n};\n\nconst Locations = [\"logs\", \"permissions\", \"data\", \"schema\"] as const;\n\ntype Location = (typeof Locations)[number];\n"],
|
|
5
|
-
"mappings": "sbAAAA,IAcO,IAAMC,EAAO,CAClB,GAAGC,EACH,aAAc,CAAE,KAAM,OAAQ,CAChC,EAEaC,EAAeC,EAACC,GACpBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IADmB,SAgDfC,EAAqBH,EAAA,MAAOI,EAAKP,IAAS,CACrD,IAAMQ,EAAY,MAAMC,EAAsB,QAAQ,IAAI,CAAC,EACrDC,EAAW,MAAMC,EAAS,KAAKJ,EAAK,CAAE,QAAS,OAAQ,KAAAP,EAAM,UAAAQ,CAAU,CAAC,EAC9E,GAAI,CAACE,EACH,MAAM,IAAIE,EAAsB,CAAE,QAAS,OAAQ,KAAAZ,EAAM,UAAAQ,CAAU,CAAC,EAGtE,IAAMK,EAAWb,EAAK,EAAE,CAAC,EACzB,GAAI,CAACa,EAAU,CACb,MAAMC,EAAK,WAAWJ,EAAS,YAAY,YAAY,aAAa,SAASA,EAAS,YAAY,IAAI,EAAE,EACxGK;AAAA,kDAC8CL,EAAS,YAAY,IAAI;AAAA,MAEvE,MACF,CAEA,GAAI,CAACM,EAAU,SAASH,CAAQ,EAAG,CACjC,GAAM,CAACI,CAAO,EAAIC,EAAcL,EAAUG,CAAS,EACnD,MAAM,IAAIG,EAASd;AAAA,iCACUQ,CAAQ;AAAA;AAAA,iCAERI,CAAO;AAAA;AAAA;AAAA,KAGnC,CACH,CAEA,OAAQJ,EAAU,CAChB,IAAK,OAAQ,CACX,MAAMC,EAAK,WAAWJ,EAAS,YAAY,YAAY,aAAa,SAASA,EAAS,YAAY,IAAI,OAAO,EAC7GK;AAAA,wDACkDL,EAAS,YAAY,IAAI;AAAA,QAE3E,KACF,CACA,IAAK,cAAe,CAClB,MAAMI,EAAK,WAAWJ,EAAS,YAAY,YAAY,aAAa,SAASA,EAAS,YAAY,IAAI,uBAAuB,EAC7HK;AAAA,kEAC4DL,EAAS,YAAY,IAAI;AAAA,QAErF,KACF,CACA,IAAK,OACL,IAAK,SAAU,CACb,IAAMU,EAAOpB,EAAK,EAAE,CAAC,EACfqB,GAA6B,MAAMC,EAAUf,EAAKG,EAAS,WAAW,GAAG,IAAKa,GAAMA,EAAE,aAAa,EAErGC,EAAqBxB,EAAK,EAAE,CAAC,EACjC,GAAI,CAACwB,EACH,GAAIxB,EAAK,YAAY,EACnBwB,EAAqB,MAAMC,EAAO,CAAE,QAASJ,EAA2B,QAAS,kCAAmC,CAAC,MAErH,OAAM,IAAIF,EAASd;AAAA,wBACLe,CAAI;AAAA;AAAA;AAAA;AAAA,yBAIHA,CAAI;AAAA,WAClB,EAIL,GAAI,CAACC,EAA0B,SAASG,CAAkB,EAAG,CAC3D,GAAM,CAACP,CAAO,EAAIC,EAAcM,EAAoBH,CAAyB,EAC7E,MAAM,IAAIF,EAASd;AAAA,kCACOmB,CAAkB;AAAA;AAAA,qCAEfP,CAAO;AAAA;AAAA;AAAA;AAAA,uBAIrBG,CAAI;AAAA,SAClB,CACH,CAEA,MAAMN,EACJ,WAAWJ,EAAS,YAAY,YAAY,aAAa,SAASA,EAAS,YAAY,IAAI,UAAUc,CAAkB,IAAIJ,CAAI,EACjI,EACAL;AAAA,iBACWK,CAAI,uCAAuCV,EAAS,YAAY,IAAI,2BAA2Bc,CAAkB;AAAA,QAE5H,KACF,CACA,QACEE,EAAQb,CAAQ,CACpB,CACF,EAtFkC,OAwF5BG,EAAY,CAAC,OAAQ,cAAe,OAAQ,QAAQ",
|
|
6
|
-
"names": ["init_cjs", "args", "SyncJsonArgs", "usage", "__name", "_ctx", "sprint", "run", "ctx", "directory", "loadSyncJsonDirectory", "syncJson", "SyncJson", "UnknownDirectoryError", "location", "open_default", "println", "Locations", "closest", "sortBySimilar", "ArgError", "view", "remoteModelApiIdentifiers", "getModels", "e", "modelApiIdentifier", "select", "isNever"]
|
|
7
|
-
}
|
package/dist/pull-ORNQFSFG.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{p as m}from"./chunk-M6L2X3GX.js";import{m as c,n as p,o as g}from"./chunk-YU6P3ESA.js";import"./chunk-JSGXXXFU.js";import"./chunk-WNAYBYSG.js";import{c as l}from"./chunk-J2OYMAMD.js";import"./chunk-JBY5A44K.js";import"./chunk-HN3YKQ3C.js";import"./chunk-L5H5T2T6.js";import"./chunk-X47UA3VR.js";import"./chunk-XGQQOMPO.js";import"./chunk-OIVNACS7.js";import{ha as s,ja as i}from"./chunk-24OT7GHO.js";import"./chunk-GFQYFEEH.js";import{a as r,h as a}from"./chunk-7DYQUG5M.js";a();var P={...c,"--env":{type:String,alias:["-e","--environment","--from"]},"--force":{type:Boolean,alias:"-f"}},A=r(e=>s`
|
|
2
|
-
Pulls your environment files to your local directory.
|
|
3
|
-
|
|
4
|
-
This command first tracks changes in your local directory since the last sync. If changes are
|
|
5
|
-
detected, you will be prompted to discard them or abort the pull.
|
|
6
|
-
|
|
7
|
-
{gray Usage}
|
|
8
|
-
ggt pull [options]
|
|
9
|
-
|
|
10
|
-
{gray Options}
|
|
11
|
-
-a, --app <app_name> Selects the app to pull your environment changes from. Default set on ".gadget/sync.json"
|
|
12
|
-
-e, --env, --from <env_name> Selects the environment to pull changes from. Default set on ".gadget/sync.json"
|
|
13
|
-
--force Forces a pull by discarding any changes made on your local directory since last sync
|
|
14
|
-
--allow-different-directory Pulls changes from any environment directory, even if the ".gadget/sync.json" file is missing
|
|
15
|
-
--allow-different-app Pulls changes to a different app using --app command, instead of the one in the “.gadget/sync.json” file
|
|
16
|
-
|
|
17
|
-
{gray Examples}
|
|
18
|
-
Pull all development environment changes by discarding any changes made locally
|
|
19
|
-
{cyanBright $ ggt pull --env development --force}
|
|
20
|
-
`,"usage"),S=r(async(e,o)=>{if(o._.length>0)throw new l(s`
|
|
21
|
-
"ggt pull" does not take any positional arguments.
|
|
22
|
-
|
|
23
|
-
If you are trying to pull changes to a specific directory,
|
|
24
|
-
you must "cd" to that directory and then run "ggt pull".
|
|
25
|
-
|
|
26
|
-
Run "ggt pull -h" for more information.
|
|
27
|
-
`);let y=await g(process.cwd()),f=await p.loadOrInit(e,{command:"pull",args:o,directory:y}),t=new m(f),n=await t.hashes(e);if(n.environmentChangesToPull.size===0){i({ensureEmptyLineAbove:!0,content:"Nothing to pull."});return}n.localChangesToPush.size>0&&await t.print(e,{hashes:n}),await t.pull(e,{hashes:n,force:o["--force"]})},"run");export{P as args,S as run,A as usage};
|
|
28
|
-
//# sourceMappingURL=pull-ORNQFSFG.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/commands/pull.ts"],
|
|
4
|
-
"sourcesContent": ["import { ArgError, type ArgsDefinition } from \"../services/command/arg.js\";\nimport type { Run, Usage } from \"../services/command/command.js\";\nimport { FileSync } from \"../services/filesync/filesync.js\";\nimport { SyncJson, SyncJsonArgs, loadSyncJsonDirectory } from \"../services/filesync/sync-json.js\";\nimport { println } from \"../services/output/print.js\";\nimport { sprint } from \"../services/output/sprint.js\";\n\nexport type PullArgs = typeof args;\n\nexport const args = {\n ...SyncJsonArgs,\n \"--env\": { type: String, alias: [\"-e\", \"--environment\", \"--from\"] },\n \"--force\": { type: Boolean, alias: \"-f\" },\n} satisfies ArgsDefinition;\n\nexport const usage: Usage = (_ctx) => {\n return sprint`\n Pulls your environment files to your local directory.\n\n This command first tracks changes in your local directory since the last sync. If changes are\n detected, you will be prompted to discard them or abort the pull.\n\n {gray Usage}\n ggt pull [options]\n\n {gray Options}\n -a, --app <app_name> Selects the app to pull your environment changes from. Default set on \".gadget/sync.json\"\n -e, --env, --from <env_name> Selects the environment to pull changes from. Default set on \".gadget/sync.json\"\n --force Forces a pull by discarding any changes made on your local directory since last sync\n --allow-different-directory Pulls changes from any environment directory, even if the \".gadget/sync.json\" file is missing\n --allow-different-app Pulls changes to a different app using --app command, instead of the one in the \u201C.gadget/sync.json\u201D file\n\n {gray Examples}\n Pull all development environment changes by discarding any changes made locally\n {cyanBright $ ggt pull --env development --force}\n `;\n};\n\nexport const run: Run<PullArgs> = async (ctx, args) => {\n if (args._.length > 0) {\n throw new ArgError(sprint`\n \"ggt pull\" does not take any positional arguments.\n\n If you are trying to pull changes to a specific directory,\n you must \"cd\" to that directory and then run \"ggt pull\".\n\n Run \"ggt pull -h\" for more information.\n `);\n }\n\n const directory = await loadSyncJsonDirectory(process.cwd());\n const syncJson = await SyncJson.loadOrInit(ctx, { command: \"pull\", args, directory });\n const filesync = new FileSync(syncJson);\n const hashes = await filesync.hashes(ctx);\n\n if (hashes.environmentChangesToPull.size === 0) {\n println({ ensureEmptyLineAbove: true, content: \"Nothing to pull.\" });\n return;\n }\n\n if (hashes.localChangesToPush.size > 0) {\n // show them the local changes they will discard\n await filesync.print(ctx, { hashes });\n }\n\n await filesync.pull(ctx, { hashes, force: args[\"--force\"] });\n};\n"],
|
|
5
|
-
"mappings": "keAAAA,IASO,IAAMC,EAAO,CAClB,GAAGC,EACH,QAAS,CAAE,KAAM,OAAQ,MAAO,CAAC,KAAM,gBAAiB,QAAQ,CAAE,EAClE,UAAW,CAAE,KAAM,QAAS,MAAO,IAAK,CAC1C,EAEaC,EAAeC,EAACC,GACpBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IADmB,SAuBfC,EAAqBH,EAAA,MAAOI,EAAKP,IAAS,CACrD,GAAIA,EAAK,EAAE,OAAS,EAClB,MAAM,IAAIQ,EAASH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOlB,EAGH,IAAMI,EAAY,MAAMC,EAAsB,QAAQ,IAAI,CAAC,EACrDC,EAAW,MAAMC,EAAS,WAAWL,EAAK,CAAE,QAAS,OAAQ,KAAAP,EAAM,UAAAS,CAAU,CAAC,EAC9EI,EAAW,IAAIC,EAASH,CAAQ,EAChCI,EAAS,MAAMF,EAAS,OAAON,CAAG,EAExC,GAAIQ,EAAO,yBAAyB,OAAS,EAAG,CAC9CC,EAAQ,CAAE,qBAAsB,GAAM,QAAS,kBAAmB,CAAC,EACnE,MACF,CAEID,EAAO,mBAAmB,KAAO,GAEnC,MAAMF,EAAS,MAAMN,EAAK,CAAE,OAAAQ,CAAO,CAAC,EAGtC,MAAMF,EAAS,KAAKN,EAAK,CAAE,OAAAQ,EAAQ,MAAOf,EAAK,SAAS,CAAE,CAAC,CAC7D,EA5BkC",
|
|
6
|
-
"names": ["init_cjs", "args", "SyncJsonArgs", "usage", "__name", "_ctx", "sprint", "run", "ctx", "ArgError", "directory", "loadSyncJsonDirectory", "syncJson", "SyncJson", "filesync", "FileSync", "hashes", "println"]
|
|
7
|
-
}
|
package/dist/push-KMZZ6JJL.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,b,c}from"./chunk-XKYYKHP4.js";import"./chunk-M6L2X3GX.js";import"./chunk-YU6P3ESA.js";import"./chunk-JSGXXXFU.js";import"./chunk-WNAYBYSG.js";import"./chunk-J2OYMAMD.js";import"./chunk-JBY5A44K.js";import"./chunk-HN3YKQ3C.js";import"./chunk-L5H5T2T6.js";import"./chunk-X47UA3VR.js";import"./chunk-XGQQOMPO.js";import"./chunk-OIVNACS7.js";import"./chunk-24OT7GHO.js";import"./chunk-GFQYFEEH.js";import"./chunk-7DYQUG5M.js";export{a as args,c as run,b as usage};
|
|
2
|
-
//# sourceMappingURL=push-KMZZ6JJL.js.map
|
package/dist/status-JAREJZ4X.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{l as p,m as f,p as h}from"./chunk-M6L2X3GX.js";import{g as u,m as y,n as l,o as d}from"./chunk-YU6P3ESA.js";import"./chunk-JSGXXXFU.js";import"./chunk-WNAYBYSG.js";import{c as m}from"./chunk-J2OYMAMD.js";import"./chunk-JBY5A44K.js";import"./chunk-HN3YKQ3C.js";import"./chunk-L5H5T2T6.js";import"./chunk-X47UA3VR.js";import"./chunk-XGQQOMPO.js";import"./chunk-OIVNACS7.js";import{ha as a}from"./chunk-24OT7GHO.js";import"./chunk-GFQYFEEH.js";import{a as r,h as g}from"./chunk-7DYQUG5M.js";g();var D=y,J=r(()=>a`
|
|
2
|
-
Shows file changes since last sync (e.g. $ggt dev, push, deploy etc.)
|
|
3
|
-
|
|
4
|
-
{gray Usage}
|
|
5
|
-
ggt status
|
|
6
|
-
`,"usage"),U=r(async(t,s)=>{if(s._.length>0)throw new m(a`
|
|
7
|
-
"ggt status" does not take any positional arguments.
|
|
8
|
-
|
|
9
|
-
If you are trying to see the status of a specific directory,
|
|
10
|
-
you must "cd" to that directory and then run "ggt status".
|
|
11
|
-
|
|
12
|
-
Run "ggt status -h" for more information.
|
|
13
|
-
`);let i=await d(process.cwd()),o=await l.load(t,{command:"status",args:s,directory:i});if(!o)throw new u({command:"status",args:s,directory:i});o.print();let c=new h(o),n=await c.hashes(t);await c.print(t,{hashes:n});let e=p({localChanges:n.localChanges,environmentChanges:n.environmentChanges});e.size>0&&(t.log.debug("conflicts detected",{conflicts:e}),f({conflicts:e}))},"run");export{D as args,U as run,J as usage};
|
|
14
|
-
//# sourceMappingURL=status-JAREJZ4X.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/commands/status.ts"],
|
|
4
|
-
"sourcesContent": ["import { ArgError, type ArgsDefinitionResult } from \"../services/command/arg.js\";\nimport type { Run, Usage } from \"../services/command/command.js\";\nimport { getConflicts, printConflicts } from \"../services/filesync/conflicts.js\";\nimport { UnknownDirectoryError } from \"../services/filesync/error.js\";\nimport { FileSync } from \"../services/filesync/filesync.js\";\nimport { SyncJson, SyncJsonArgs, loadSyncJsonDirectory } from \"../services/filesync/sync-json.js\";\nimport { sprint } from \"../services/output/sprint.js\";\n\nexport type StatusArgs = typeof args;\nexport type StatusArgsResult = ArgsDefinitionResult<StatusArgs>;\n\nexport const args = SyncJsonArgs;\n\nexport const usage: Usage = () => {\n return sprint`\n Shows file changes since last sync (e.g. $ggt dev, push, deploy etc.)\n\n {gray Usage}\n ggt status\n `;\n};\n\nexport const run: Run<StatusArgs> = async (ctx, args) => {\n if (args._.length > 0) {\n throw new ArgError(sprint`\n \"ggt status\" does not take any positional arguments.\n\n If you are trying to see the status of a specific directory,\n you must \"cd\" to that directory and then run \"ggt status\".\n\n Run \"ggt status -h\" for more information.\n `);\n }\n\n const directory = await loadSyncJsonDirectory(process.cwd());\n const syncJson = await SyncJson.load(ctx, { command: \"status\", args, directory });\n if (!syncJson) {\n throw new UnknownDirectoryError({ command: \"status\", args, directory });\n }\n\n syncJson.print();\n\n const filesync = new FileSync(syncJson);\n const hashes = await filesync.hashes(ctx);\n await filesync.print(ctx, { hashes });\n\n const conflicts = getConflicts({ localChanges: hashes.localChanges, environmentChanges: hashes.environmentChanges });\n if (conflicts.size > 0) {\n ctx.log.debug(\"conflicts detected\", { conflicts });\n printConflicts({ conflicts });\n }\n};\n"],
|
|
5
|
-
"mappings": "+eAAAA,IAWO,IAAMC,EAAOC,EAEPC,EAAeC,EAAA,IACnBC;AAAA;AAAA;AAAA;AAAA;AAAA,IADmB,SASfC,EAAuBF,EAAA,MAAOG,EAAKN,IAAS,CACvD,GAAIA,EAAK,EAAE,OAAS,EAClB,MAAM,IAAIO,EAASH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOlB,EAGH,IAAMI,EAAY,MAAMC,EAAsB,QAAQ,IAAI,CAAC,EACrDC,EAAW,MAAMC,EAAS,KAAKL,EAAK,CAAE,QAAS,SAAU,KAAAN,EAAM,UAAAQ,CAAU,CAAC,EAChF,GAAI,CAACE,EACH,MAAM,IAAIE,EAAsB,CAAE,QAAS,SAAU,KAAAZ,EAAM,UAAAQ,CAAU,CAAC,EAGxEE,EAAS,MAAM,EAEf,IAAMG,EAAW,IAAIC,EAASJ,CAAQ,EAChCK,EAAS,MAAMF,EAAS,OAAOP,CAAG,EACxC,MAAMO,EAAS,MAAMP,EAAK,CAAE,OAAAS,CAAO,CAAC,EAEpC,IAAMC,EAAYC,EAAa,CAAE,aAAcF,EAAO,aAAc,mBAAoBA,EAAO,kBAAmB,CAAC,EAC/GC,EAAU,KAAO,IACnBV,EAAI,IAAI,MAAM,qBAAsB,CAAE,UAAAU,CAAU,CAAC,EACjDE,EAAe,CAAE,UAAAF,CAAU,CAAC,EAEhC,EA7BoC",
|
|
6
|
-
"names": ["init_cjs", "args", "SyncJsonArgs", "usage", "__name", "sprint", "run", "ctx", "ArgError", "directory", "loadSyncJsonDirectory", "syncJson", "SyncJson", "UnknownDirectoryError", "filesync", "FileSync", "hashes", "conflicts", "getConflicts", "printConflicts"]
|
|
7
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|