@getxflow/cli 0.34.2 → 1.0.1

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/flags.js CHANGED
@@ -21,10 +21,11 @@ const help_1 = require("./help");
21
21
  * only when that command can answer without the working copy. The ones that cannot
22
22
  * have a folder to stand in, and naming a project they cannot read would be a lie;
23
23
  * they are listed in WORKING_COPY below, each with what it reads from that folder.
24
- * `deploy` sits halfway and keeps the flag: sending the sources needs the folder,
25
- * but building a revision the platform already holds (`--revision`) does not, and
26
- * it is the only way to bring back the version of a project without pages. Named
27
- * by id without `--revision` it refuses, in those words.
24
+ * `deploy` sits halfway and keeps `--project` and `--app`: sending the sources needs
25
+ * the folder, but building a revision the platform already holds (`--revision`) does
26
+ * not, and that is how the functions of a project come back. Named by id without
27
+ * `--revision` it refuses, in those words. `--app` names an app without its folder
28
+ * wherever `--project` would name the project stream.
28
29
  * `db status` sits halfway: named by id it answers with the applied history alone,
29
30
  * without the comparison against migrations/. `connections unlink` sits there too:
30
31
  * by id it removes the link without the check of what reads the variables, because
@@ -43,12 +44,14 @@ exports.KNOWN = {
43
44
  'org list': [],
44
45
  'org members': [],
45
46
  'org switch': [],
46
- templates: [],
47
- init: ['name', 'template', 'database', 'server', 'function'],
47
+ init: ['name', 'app', 'no-app', 'server'],
48
48
  link: [],
49
49
  projects: [],
50
50
  'projects list': [],
51
51
  'projects get': [],
52
+ apps: ['json', 'project'],
53
+ 'apps list': ['json', 'project'],
54
+ 'apps add': ['name', 'color'],
52
55
  skills: ['refresh', 'global', 'agent', 'yes'],
53
56
  mcp: ['show-token'],
54
57
  'mcp install': ['show-token'],
@@ -56,7 +59,7 @@ exports.KNOWN = {
56
59
  'functions list': ['project'],
57
60
  'functions invoke': ['data', 'data-file', 'json', 'method', 'project'],
58
61
  'functions logs': ['limit', 'project'],
59
- logs: ['limit', 'project'],
62
+ logs: ['limit', 'project', 'app'],
60
63
  env: ['project'],
61
64
  'env list': ['project'],
62
65
  'env set': ['scope'],
@@ -92,13 +95,15 @@ exports.KNOWN = {
92
95
  'pages deploy': ['message'],
93
96
  'pages status': ['json'],
94
97
  'pages rollback': [],
98
+ 'pages rm': ['yes'],
99
+ 'pages remove': ['yes'],
95
100
  status: [],
96
101
  dev: [],
97
102
  pull: ['into', 'force', 'revision'],
98
- deploy: ['no-push', 'force', 'allow-removals', 'message', 'revision', 'project'],
99
- publish: ['project'],
100
- rollback: ['project'],
101
- deployments: ['project'],
103
+ deploy: ['no-push', 'force', 'allow-removals', 'message', 'revision', 'project', 'app'],
104
+ publish: ['app'],
105
+ rollback: ['app'],
106
+ deployments: ['project', 'app'],
102
107
  update: [],
103
108
  };
104
109
  /**
@@ -116,7 +121,10 @@ exports.KNOWN = {
116
121
  exports.WORKING_COPY = {
117
122
  pull: 'it writes the sources next to it',
118
123
  status: 'it compares the folder with the revision on the platform',
119
- dev: 'it runs the dev server of the code next to it',
124
+ dev: 'it runs the dev server of the app folder it stands in',
125
+ 'apps add': 'it lays the template into apps/',
126
+ publish: 'an app is named by its folder or by --app <id>',
127
+ rollback: 'an app is named by its folder or by --app <id>',
120
128
  'db migrate': 'it applies the files of migrations/',
121
129
  'env check': 'it looks for the variables the code of the functions reads',
122
130
  'env set': 'it names the functions that need a deploy for the value to arrive',
@@ -131,6 +139,7 @@ const GLOBAL = new Set(['help', 'version']);
131
139
  const NAMESPACES = new Set([
132
140
  'org',
133
141
  'projects',
142
+ 'apps',
134
143
  'functions',
135
144
  'env',
136
145
  'connections',