appwrite-cli 17.0.0 → 17.1.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/CHANGELOG.md +6 -0
- package/README.md +2 -2
- package/cli.ts +6 -0
- package/dist/bundle-win-arm64.mjs +489 -122
- package/dist/cli.cjs +489 -122
- package/dist/index.cjs +175 -85
- package/dist/index.js +175 -85
- package/dist/lib/commands/services/organizations.d.ts +3 -0
- package/dist/lib/commands/services/organizations.d.ts.map +1 -0
- package/dist/lib/commands/services/teams.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/emulation/utils.d.ts.map +1 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/types.d.ts +1 -0
- package/dist/lib/types.d.ts.map +1 -1
- package/docs/examples/organizations/add-credit.md +5 -0
- package/docs/examples/organizations/cancel-downgrade.md +4 -0
- package/docs/examples/organizations/create-downgrade-feedback.md +8 -0
- package/docs/examples/organizations/create-invoice-payment.md +6 -0
- package/docs/examples/organizations/create-key.md +6 -0
- package/docs/examples/organizations/create.md +6 -0
- package/docs/examples/organizations/delete-backup-payment-method.md +4 -0
- package/docs/examples/organizations/delete-default-payment-method.md +4 -0
- package/docs/examples/organizations/delete-key.md +5 -0
- package/docs/examples/organizations/delete.md +4 -0
- package/docs/examples/organizations/estimation-create-organization.md +4 -0
- package/docs/examples/organizations/estimation-delete-organization.md +4 -0
- package/docs/examples/organizations/estimation-update-plan.md +5 -0
- package/docs/examples/organizations/get-aggregation.md +5 -0
- package/docs/examples/organizations/get-available-credits.md +4 -0
- package/docs/examples/organizations/get-credit.md +5 -0
- package/docs/examples/organizations/get-invoice-download.md +5 -0
- package/docs/examples/organizations/get-invoice-view.md +5 -0
- package/docs/examples/organizations/get-invoice.md +5 -0
- package/docs/examples/organizations/get-key.md +5 -0
- package/docs/examples/organizations/get-plan.md +4 -0
- package/docs/examples/organizations/get-scopes.md +4 -0
- package/docs/examples/organizations/get-usage.md +4 -0
- package/docs/examples/organizations/list-aggregations.md +4 -0
- package/docs/examples/organizations/list-credits.md +4 -0
- package/docs/examples/organizations/list-keys.md +4 -0
- package/docs/examples/organizations/list-regions.md +4 -0
- package/docs/examples/organizations/list.md +3 -0
- package/docs/examples/organizations/set-backup-payment-method.md +5 -0
- package/docs/examples/organizations/set-billing-address.md +5 -0
- package/docs/examples/organizations/set-billing-email.md +5 -0
- package/docs/examples/organizations/set-billing-tax-id.md +5 -0
- package/docs/examples/organizations/set-default-payment-method.md +5 -0
- package/docs/examples/organizations/update-budget.md +5 -0
- package/docs/examples/organizations/update-key.md +7 -0
- package/docs/examples/organizations/update-plan.md +5 -0
- package/docs/examples/organizations/validate-invoice.md +5 -0
- package/docs/examples/organizations/validate-payment.md +4 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/commands/services/migrations.ts +2 -2
- package/lib/commands/services/organizations.ts +517 -0
- package/lib/commands/services/projects.ts +2 -2
- package/lib/commands/services/proxy.ts +2 -2
- package/lib/commands/services/teams.ts +10 -1
- package/lib/commands/services/vcs.ts +2 -2
- package/lib/constants.ts +1 -1
- package/lib/emulation/utils.ts +3 -2
- package/lib/parser.ts +149 -27
- package/lib/questions.ts +2 -2
- package/lib/sdks.ts +1 -0
- package/lib/types.ts +1 -0
- package/package.json +1 -1
- package/scoop/appwrite.config.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -19600,7 +19600,6 @@ var require_safe_buffer = __commonJS({
|
|
|
19600
19600
|
function SafeBuffer(arg, encodingOrOffset, length) {
|
|
19601
19601
|
return Buffer2(arg, encodingOrOffset, length);
|
|
19602
19602
|
}
|
|
19603
|
-
SafeBuffer.prototype = Object.create(Buffer2.prototype);
|
|
19604
19603
|
copyProps(Buffer2, SafeBuffer);
|
|
19605
19604
|
SafeBuffer.from = function(arg, encodingOrOffset, length) {
|
|
19606
19605
|
if (typeof arg === "number") {
|
|
@@ -57282,7 +57281,7 @@ var require_helpers = __commonJS({
|
|
|
57282
57281
|
if (instance.helpers[helperName]) {
|
|
57283
57282
|
instance.hooks[helperName] = instance.helpers[helperName];
|
|
57284
57283
|
if (!keepHelper) {
|
|
57285
|
-
|
|
57284
|
+
instance.helpers[helperName] = void 0;
|
|
57286
57285
|
}
|
|
57287
57286
|
}
|
|
57288
57287
|
}
|
|
@@ -57374,22 +57373,6 @@ var require_logger = __commonJS({
|
|
|
57374
57373
|
}
|
|
57375
57374
|
});
|
|
57376
57375
|
|
|
57377
|
-
// node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js
|
|
57378
|
-
var require_create_new_lookup_object = __commonJS({
|
|
57379
|
-
"node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js"(exports2) {
|
|
57380
|
-
"use strict";
|
|
57381
|
-
exports2.__esModule = true;
|
|
57382
|
-
exports2.createNewLookupObject = createNewLookupObject;
|
|
57383
|
-
var _utils = require_utils5();
|
|
57384
|
-
function createNewLookupObject() {
|
|
57385
|
-
for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
|
|
57386
|
-
sources[_key] = arguments[_key];
|
|
57387
|
-
}
|
|
57388
|
-
return _utils.extend.apply(void 0, [/* @__PURE__ */ Object.create(null)].concat(sources));
|
|
57389
|
-
}
|
|
57390
|
-
}
|
|
57391
|
-
});
|
|
57392
|
-
|
|
57393
57376
|
// node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js
|
|
57394
57377
|
var require_proto_access = __commonJS({
|
|
57395
57378
|
"node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js"(exports2) {
|
|
@@ -57401,25 +57384,28 @@ var require_proto_access = __commonJS({
|
|
|
57401
57384
|
function _interopRequireDefault(obj) {
|
|
57402
57385
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
57403
57386
|
}
|
|
57404
|
-
var
|
|
57387
|
+
var _utils = require_utils5();
|
|
57405
57388
|
var _logger = require_logger();
|
|
57406
57389
|
var _logger2 = _interopRequireDefault(_logger);
|
|
57407
57390
|
var loggedProperties = /* @__PURE__ */ Object.create(null);
|
|
57408
57391
|
function createProtoAccessControl(runtimeOptions) {
|
|
57409
|
-
var
|
|
57410
|
-
|
|
57411
|
-
|
|
57412
|
-
|
|
57413
|
-
|
|
57414
|
-
|
|
57415
|
-
|
|
57392
|
+
var propertyWhiteList = /* @__PURE__ */ Object.create(null);
|
|
57393
|
+
propertyWhiteList["__proto__"] = false;
|
|
57394
|
+
_utils.extend(propertyWhiteList, runtimeOptions.allowedProtoProperties);
|
|
57395
|
+
var methodWhiteList = /* @__PURE__ */ Object.create(null);
|
|
57396
|
+
methodWhiteList["constructor"] = false;
|
|
57397
|
+
methodWhiteList["__defineGetter__"] = false;
|
|
57398
|
+
methodWhiteList["__defineSetter__"] = false;
|
|
57399
|
+
methodWhiteList["__lookupGetter__"] = false;
|
|
57400
|
+
methodWhiteList["__lookupSetter__"] = false;
|
|
57401
|
+
_utils.extend(methodWhiteList, runtimeOptions.allowedProtoMethods);
|
|
57416
57402
|
return {
|
|
57417
57403
|
properties: {
|
|
57418
|
-
whitelist:
|
|
57404
|
+
whitelist: propertyWhiteList,
|
|
57419
57405
|
defaultValue: runtimeOptions.allowProtoPropertiesByDefault
|
|
57420
57406
|
},
|
|
57421
57407
|
methods: {
|
|
57422
|
-
whitelist:
|
|
57408
|
+
whitelist: methodWhiteList,
|
|
57423
57409
|
defaultValue: runtimeOptions.allowProtoMethodsByDefault
|
|
57424
57410
|
}
|
|
57425
57411
|
};
|
|
@@ -57472,7 +57458,7 @@ var require_base2 = __commonJS({
|
|
|
57472
57458
|
var _logger = require_logger();
|
|
57473
57459
|
var _logger2 = _interopRequireDefault(_logger);
|
|
57474
57460
|
var _internalProtoAccess = require_proto_access();
|
|
57475
|
-
var VERSION = "4.7.
|
|
57461
|
+
var VERSION = "4.7.9";
|
|
57476
57462
|
exports2.VERSION = VERSION;
|
|
57477
57463
|
var COMPILER_REVISION = 8;
|
|
57478
57464
|
exports2.COMPILER_REVISION = COMPILER_REVISION;
|
|
@@ -57658,14 +57644,12 @@ var require_runtime = __commonJS({
|
|
|
57658
57644
|
}
|
|
57659
57645
|
}
|
|
57660
57646
|
partial2 = env.VM.resolvePartial.call(this, partial2, context, options);
|
|
57661
|
-
|
|
57662
|
-
|
|
57663
|
-
|
|
57664
|
-
});
|
|
57665
|
-
var result = env.VM.invokePartial.call(this, partial2, context, extendedOptions);
|
|
57647
|
+
options.hooks = this.hooks;
|
|
57648
|
+
options.protoAccessControl = this.protoAccessControl;
|
|
57649
|
+
var result = env.VM.invokePartial.call(this, partial2, context, options);
|
|
57666
57650
|
if (result == null && env.compile) {
|
|
57667
57651
|
options.partials[options.name] = env.compile(partial2, templateSpec.compilerOptions, env);
|
|
57668
|
-
result = options.partials[options.name](context,
|
|
57652
|
+
result = options.partials[options.name](context, options);
|
|
57669
57653
|
}
|
|
57670
57654
|
if (result != null) {
|
|
57671
57655
|
if (options.indent) {
|
|
@@ -57710,7 +57694,7 @@ var require_runtime = __commonJS({
|
|
|
57710
57694
|
for (var i = 0; i < len; i++) {
|
|
57711
57695
|
var result = depths[i] && container.lookupProperty(depths[i], name);
|
|
57712
57696
|
if (result != null) {
|
|
57713
|
-
return
|
|
57697
|
+
return result;
|
|
57714
57698
|
}
|
|
57715
57699
|
}
|
|
57716
57700
|
},
|
|
@@ -57776,8 +57760,9 @@ var require_runtime = __commonJS({
|
|
|
57776
57760
|
ret.isTop = true;
|
|
57777
57761
|
ret._setup = function(options) {
|
|
57778
57762
|
if (!options.partial) {
|
|
57779
|
-
var mergedHelpers =
|
|
57780
|
-
|
|
57763
|
+
var mergedHelpers = {};
|
|
57764
|
+
addHelpers(mergedHelpers, env.helpers, container);
|
|
57765
|
+
addHelpers(mergedHelpers, options.helpers, container);
|
|
57781
57766
|
container.helpers = mergedHelpers;
|
|
57782
57767
|
if (templateSpec.usePartial) {
|
|
57783
57768
|
container.partials = container.mergeIfNeeded(options.partials, env.partials);
|
|
@@ -57827,18 +57812,18 @@ var require_runtime = __commonJS({
|
|
|
57827
57812
|
function resolvePartial(partial2, context, options) {
|
|
57828
57813
|
if (!partial2) {
|
|
57829
57814
|
if (options.name === "@partial-block") {
|
|
57830
|
-
partial2 = options.data
|
|
57815
|
+
partial2 = lookupOwnProperty(options.data, "partial-block");
|
|
57831
57816
|
} else {
|
|
57832
|
-
partial2 = options.partials
|
|
57817
|
+
partial2 = lookupOwnProperty(options.partials, options.name);
|
|
57833
57818
|
}
|
|
57834
57819
|
} else if (!partial2.call && !options.name) {
|
|
57835
57820
|
options.name = partial2;
|
|
57836
|
-
partial2 = options.partials
|
|
57821
|
+
partial2 = lookupOwnProperty(options.partials, partial2);
|
|
57837
57822
|
}
|
|
57838
57823
|
return partial2;
|
|
57839
57824
|
}
|
|
57840
57825
|
function invokePartial(partial2, context, options) {
|
|
57841
|
-
var currentPartialBlock = options.data
|
|
57826
|
+
var currentPartialBlock = lookupOwnProperty(options.data, "partial-block");
|
|
57842
57827
|
options.partial = true;
|
|
57843
57828
|
if (options.ids) {
|
|
57844
57829
|
options.data.contextPath = options.ids[0] || options.data.contextPath;
|
|
@@ -57871,6 +57856,11 @@ var require_runtime = __commonJS({
|
|
|
57871
57856
|
function noop() {
|
|
57872
57857
|
return "";
|
|
57873
57858
|
}
|
|
57859
|
+
function lookupOwnProperty(obj, name) {
|
|
57860
|
+
if (obj && Object.prototype.hasOwnProperty.call(obj, name)) {
|
|
57861
|
+
return obj[name];
|
|
57862
|
+
}
|
|
57863
|
+
}
|
|
57874
57864
|
function initData(context, data) {
|
|
57875
57865
|
if (!data || !("root" in data)) {
|
|
57876
57866
|
data = data ? _base.createFrame(data) : {};
|
|
@@ -57886,16 +57876,18 @@ var require_runtime = __commonJS({
|
|
|
57886
57876
|
}
|
|
57887
57877
|
return prog;
|
|
57888
57878
|
}
|
|
57889
|
-
function
|
|
57890
|
-
|
|
57891
|
-
|
|
57879
|
+
function addHelpers(mergedHelpers, helpers, container) {
|
|
57880
|
+
if (!helpers) return;
|
|
57881
|
+
Object.keys(helpers).forEach(function(helperName) {
|
|
57882
|
+
var helper = helpers[helperName];
|
|
57892
57883
|
mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
|
|
57893
57884
|
});
|
|
57894
57885
|
}
|
|
57895
57886
|
function passLookupPropertyOption(helper, container) {
|
|
57896
57887
|
var lookupProperty = container.lookupProperty;
|
|
57897
57888
|
return _internalWrapHelper.wrapHelper(helper, function(options) {
|
|
57898
|
-
|
|
57889
|
+
options.lookupProperty = lookupProperty;
|
|
57890
|
+
return options;
|
|
57899
57891
|
});
|
|
57900
57892
|
}
|
|
57901
57893
|
}
|
|
@@ -58705,7 +58697,7 @@ var require_parser = __commonJS({
|
|
|
58705
58697
|
break;
|
|
58706
58698
|
}
|
|
58707
58699
|
};
|
|
58708
|
-
lexer2.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[
|
|
58700
|
+
lexer2.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
|
|
58709
58701
|
lexer2.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
|
|
58710
58702
|
return lexer2;
|
|
58711
58703
|
})();
|
|
@@ -59212,12 +59204,15 @@ var require_base3 = __commonJS({
|
|
|
59212
59204
|
var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
|
|
59213
59205
|
var _helpers = require_helpers2();
|
|
59214
59206
|
var Helpers = _interopRequireWildcard(_helpers);
|
|
59207
|
+
var _exception = require_exception();
|
|
59208
|
+
var _exception2 = _interopRequireDefault(_exception);
|
|
59215
59209
|
var _utils = require_utils5();
|
|
59216
59210
|
exports2.parser = _parser2["default"];
|
|
59217
59211
|
var yy = {};
|
|
59218
59212
|
_utils.extend(yy, Helpers);
|
|
59219
59213
|
function parseWithoutProcessing(input, options) {
|
|
59220
59214
|
if (input.type === "Program") {
|
|
59215
|
+
validateInputAst(input);
|
|
59221
59216
|
return input;
|
|
59222
59217
|
}
|
|
59223
59218
|
_parser2["default"].yy = yy;
|
|
@@ -59232,6 +59227,51 @@ var require_base3 = __commonJS({
|
|
|
59232
59227
|
var strip = new _whitespaceControl2["default"](options);
|
|
59233
59228
|
return strip.accept(ast);
|
|
59234
59229
|
}
|
|
59230
|
+
function validateInputAst(ast) {
|
|
59231
|
+
validateAstNode(ast);
|
|
59232
|
+
}
|
|
59233
|
+
function validateAstNode(node) {
|
|
59234
|
+
if (node == null) {
|
|
59235
|
+
return;
|
|
59236
|
+
}
|
|
59237
|
+
if (Array.isArray(node)) {
|
|
59238
|
+
node.forEach(validateAstNode);
|
|
59239
|
+
return;
|
|
59240
|
+
}
|
|
59241
|
+
if (typeof node !== "object") {
|
|
59242
|
+
return;
|
|
59243
|
+
}
|
|
59244
|
+
if (node.type === "PathExpression") {
|
|
59245
|
+
if (!isValidDepth(node.depth)) {
|
|
59246
|
+
throw new _exception2["default"]("Invalid AST: PathExpression.depth must be an integer");
|
|
59247
|
+
}
|
|
59248
|
+
if (!Array.isArray(node.parts)) {
|
|
59249
|
+
throw new _exception2["default"]("Invalid AST: PathExpression.parts must be an array");
|
|
59250
|
+
}
|
|
59251
|
+
for (var i = 0; i < node.parts.length; i++) {
|
|
59252
|
+
if (typeof node.parts[i] !== "string") {
|
|
59253
|
+
throw new _exception2["default"]("Invalid AST: PathExpression.parts must only contain strings");
|
|
59254
|
+
}
|
|
59255
|
+
}
|
|
59256
|
+
} else if (node.type === "NumberLiteral") {
|
|
59257
|
+
if (typeof node.value !== "number" || !isFinite(node.value)) {
|
|
59258
|
+
throw new _exception2["default"]("Invalid AST: NumberLiteral.value must be a number");
|
|
59259
|
+
}
|
|
59260
|
+
} else if (node.type === "BooleanLiteral") {
|
|
59261
|
+
if (typeof node.value !== "boolean") {
|
|
59262
|
+
throw new _exception2["default"]("Invalid AST: BooleanLiteral.value must be a boolean");
|
|
59263
|
+
}
|
|
59264
|
+
}
|
|
59265
|
+
Object.keys(node).forEach(function(propertyName) {
|
|
59266
|
+
if (propertyName === "loc") {
|
|
59267
|
+
return;
|
|
59268
|
+
}
|
|
59269
|
+
validateAstNode(node[propertyName]);
|
|
59270
|
+
});
|
|
59271
|
+
}
|
|
59272
|
+
function isValidDepth(depth) {
|
|
59273
|
+
return typeof depth === "number" && isFinite(depth) && Math.floor(depth) === depth && depth >= 0;
|
|
59274
|
+
}
|
|
59235
59275
|
}
|
|
59236
59276
|
});
|
|
59237
59277
|
|
|
@@ -61660,12 +61700,10 @@ var require_javascript_compiler = __commonJS({
|
|
|
61660
61700
|
var programs = _context.programs;
|
|
61661
61701
|
var decorators = _context.decorators;
|
|
61662
61702
|
for (i = 0, l = programs.length; i < l; i++) {
|
|
61663
|
-
|
|
61664
|
-
|
|
61665
|
-
|
|
61666
|
-
|
|
61667
|
-
ret.useDecorators = true;
|
|
61668
|
-
}
|
|
61703
|
+
ret[i] = programs[i];
|
|
61704
|
+
if (decorators[i]) {
|
|
61705
|
+
ret[i + "_d"] = decorators[i];
|
|
61706
|
+
ret.useDecorators = true;
|
|
61669
61707
|
}
|
|
61670
61708
|
}
|
|
61671
61709
|
if (this.environment.usePartial) {
|
|
@@ -61926,22 +61964,25 @@ var require_javascript_compiler = __commonJS({
|
|
|
61926
61964
|
}
|
|
61927
61965
|
this.resolvePath("data", parts, 0, true, strict);
|
|
61928
61966
|
},
|
|
61929
|
-
resolvePath: function resolvePath(type, parts,
|
|
61967
|
+
resolvePath: function resolvePath(type, parts, startPartIndex, falsy, strict) {
|
|
61930
61968
|
var _this2 = this;
|
|
61931
61969
|
if (this.options.strict || this.options.assumeObjects) {
|
|
61932
|
-
this.push(strictLookup(this.options.strict && strict, this, parts,
|
|
61970
|
+
this.push(strictLookup(this.options.strict && strict, this, parts, startPartIndex, type));
|
|
61933
61971
|
return;
|
|
61934
61972
|
}
|
|
61935
61973
|
var len = parts.length;
|
|
61936
|
-
|
|
61937
|
-
|
|
61938
|
-
var lookup = _this2.nameLookup(current, parts[
|
|
61974
|
+
var _loop = function(i2) {
|
|
61975
|
+
_this2.replaceStack(function(current) {
|
|
61976
|
+
var lookup = _this2.nameLookup(current, parts[i2], type);
|
|
61939
61977
|
if (!falsy) {
|
|
61940
61978
|
return [" != null ? ", lookup, " : ", current];
|
|
61941
61979
|
} else {
|
|
61942
61980
|
return [" && ", lookup];
|
|
61943
61981
|
}
|
|
61944
61982
|
});
|
|
61983
|
+
};
|
|
61984
|
+
for (var i = startPartIndex; i < len; i++) {
|
|
61985
|
+
_loop(i);
|
|
61945
61986
|
}
|
|
61946
61987
|
},
|
|
61947
61988
|
// [resolvePossibleLambda]
|
|
@@ -62045,7 +62086,9 @@ var require_javascript_compiler = __commonJS({
|
|
|
62045
62086
|
// and inserts the decorator into the decorators list.
|
|
62046
62087
|
registerDecorator: function registerDecorator(paramSize, name) {
|
|
62047
62088
|
var foundDecorator = this.nameLookup("decorators", name, "decorator"), options = this.setupHelperArgs(name, paramSize);
|
|
62048
|
-
this.decorators.push(["
|
|
62089
|
+
this.decorators.push(["var decorator = ", foundDecorator, ";"]);
|
|
62090
|
+
this.decorators.push(['if (typeof decorator !== "function") { throw new Error(', this.quotedString('Missing decorator: "' + name + '"'), "); }"]);
|
|
62091
|
+
this.decorators.push(["fn = ", this.decorators.functionCall("decorator", "", ["fn", "props", "container", options]), " || fn;"]);
|
|
62049
62092
|
},
|
|
62050
62093
|
// [invokeHelper]
|
|
62051
62094
|
//
|
|
@@ -62192,8 +62235,7 @@ var require_javascript_compiler = __commonJS({
|
|
|
62192
62235
|
compiler = new this.compiler();
|
|
62193
62236
|
var existing = this.matchExistingProgram(child);
|
|
62194
62237
|
if (existing == null) {
|
|
62195
|
-
this.context.programs.push("");
|
|
62196
|
-
var index = this.context.programs.length;
|
|
62238
|
+
var index = this.context.programs.push("") - 1;
|
|
62197
62239
|
child.index = index;
|
|
62198
62240
|
child.name = "program" + index;
|
|
62199
62241
|
this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
|
|
@@ -62437,16 +62479,16 @@ var require_javascript_compiler = __commonJS({
|
|
|
62437
62479
|
JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
|
|
62438
62480
|
return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
|
|
62439
62481
|
};
|
|
62440
|
-
function strictLookup(requireTerminal, compiler, parts,
|
|
62482
|
+
function strictLookup(requireTerminal, compiler, parts, startPartIndex, type) {
|
|
62441
62483
|
var stack = compiler.popStack(), len = parts.length;
|
|
62442
62484
|
if (requireTerminal) {
|
|
62443
62485
|
len--;
|
|
62444
62486
|
}
|
|
62445
|
-
for (; i < len; i++) {
|
|
62487
|
+
for (var i = startPartIndex; i < len; i++) {
|
|
62446
62488
|
stack = compiler.nameLookup(stack, parts[i], type);
|
|
62447
62489
|
}
|
|
62448
62490
|
if (requireTerminal) {
|
|
62449
|
-
return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[
|
|
62491
|
+
return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[len]), ", ", JSON.stringify(compiler.source.currentLocation), " )"];
|
|
62450
62492
|
} else {
|
|
62451
62493
|
return stack;
|
|
62452
62494
|
}
|
|
@@ -62747,7 +62789,7 @@ var id_default = ID;
|
|
|
62747
62789
|
// lib/constants.ts
|
|
62748
62790
|
var SDK_TITLE = "Appwrite";
|
|
62749
62791
|
var SDK_TITLE_LOWER = "appwrite";
|
|
62750
|
-
var SDK_VERSION = "17.
|
|
62792
|
+
var SDK_VERSION = "17.1.0";
|
|
62751
62793
|
var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
|
|
62752
62794
|
var EXECUTABLE_NAME = "appwrite";
|
|
62753
62795
|
var NPM_PACKAGE_NAME = "appwrite-cli";
|
|
@@ -100294,7 +100336,7 @@ var package_default = {
|
|
|
100294
100336
|
type: "module",
|
|
100295
100337
|
homepage: "https://appwrite.io/support",
|
|
100296
100338
|
description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
100297
|
-
version: "17.
|
|
100339
|
+
version: "17.1.0",
|
|
100298
100340
|
license: "BSD-3-Clause",
|
|
100299
100341
|
main: "dist/index.cjs",
|
|
100300
100342
|
module: "dist/index.js",
|
|
@@ -100384,10 +100426,14 @@ var package_default = {
|
|
|
100384
100426
|
|
|
100385
100427
|
// lib/parser.ts
|
|
100386
100428
|
var import_os2 = __toESM(require("os"), 1);
|
|
100429
|
+
BigInt.prototype.toJSON = function() {
|
|
100430
|
+
return this.toString();
|
|
100431
|
+
};
|
|
100387
100432
|
var { description } = package_default;
|
|
100388
100433
|
var cliConfig = {
|
|
100389
100434
|
verbose: false,
|
|
100390
100435
|
json: false,
|
|
100436
|
+
raw: false,
|
|
100391
100437
|
force: false,
|
|
100392
100438
|
all: false,
|
|
100393
100439
|
ids: [],
|
|
@@ -100410,6 +100456,25 @@ var extractReportCommandArgs = (value) => {
|
|
|
100410
100456
|
}
|
|
100411
100457
|
return reportData.data.args;
|
|
100412
100458
|
};
|
|
100459
|
+
var MAX_COL_WIDTH = 40;
|
|
100460
|
+
var formatCellValue = (value) => {
|
|
100461
|
+
if (value == null) return "-";
|
|
100462
|
+
if (Array.isArray(value)) {
|
|
100463
|
+
if (value.length === 0) return "[]";
|
|
100464
|
+
return `[${value.length} items]`;
|
|
100465
|
+
}
|
|
100466
|
+
if (typeof value === "object") {
|
|
100467
|
+
if (value?.constructor?.name === "BigNumber") return String(value);
|
|
100468
|
+
const keys = Object.keys(value);
|
|
100469
|
+
if (keys.length === 0) return "{}";
|
|
100470
|
+
return `{${keys.length} keys}`;
|
|
100471
|
+
}
|
|
100472
|
+
const str = String(value);
|
|
100473
|
+
if (str.length > MAX_COL_WIDTH) {
|
|
100474
|
+
return str.slice(0, MAX_COL_WIDTH - 1) + "\u2026";
|
|
100475
|
+
}
|
|
100476
|
+
return str;
|
|
100477
|
+
};
|
|
100413
100478
|
var drawTable = (data) => {
|
|
100414
100479
|
if (data.length == 0) {
|
|
100415
100480
|
console.log("[]");
|
|
@@ -100417,19 +100482,55 @@ var drawTable = (data) => {
|
|
|
100417
100482
|
}
|
|
100418
100483
|
const rows = data.map((item) => toJsonObject(item) ?? {});
|
|
100419
100484
|
const obj = rows.reduce((res, item) => ({ ...res, ...item }), {});
|
|
100420
|
-
const
|
|
100421
|
-
if (
|
|
100485
|
+
const allKeys = Object.keys(obj);
|
|
100486
|
+
if (allKeys.length === 0) {
|
|
100422
100487
|
drawJSON(data);
|
|
100423
100488
|
return;
|
|
100424
100489
|
}
|
|
100425
|
-
const
|
|
100490
|
+
const maxColumns = 6;
|
|
100491
|
+
if (allKeys.length > maxColumns) {
|
|
100492
|
+
const rowEntries = rows.map((row) => {
|
|
100493
|
+
const entries = [];
|
|
100494
|
+
for (const key of Object.keys(row)) {
|
|
100495
|
+
const value = row[key];
|
|
100496
|
+
if (typeof value === "function") continue;
|
|
100497
|
+
if (value == null) continue;
|
|
100498
|
+
if (value?.constructor?.name === "BigNumber") {
|
|
100499
|
+
entries.push([key, String(value)]);
|
|
100500
|
+
continue;
|
|
100501
|
+
}
|
|
100502
|
+
if (typeof value === "object") continue;
|
|
100503
|
+
if (typeof value === "string" && value.trim() === "") continue;
|
|
100504
|
+
entries.push([key, String(value)]);
|
|
100505
|
+
}
|
|
100506
|
+
return entries;
|
|
100507
|
+
});
|
|
100508
|
+
const flatEntries = rowEntries.flat();
|
|
100509
|
+
if (flatEntries.length === 0) {
|
|
100510
|
+
drawJSON(data);
|
|
100511
|
+
return;
|
|
100512
|
+
}
|
|
100513
|
+
const maxKeyLen = Math.max(...flatEntries.map(([key]) => key.length));
|
|
100514
|
+
const separatorLen = Math.min(maxKeyLen + 2 + MAX_COL_WIDTH, process.stdout.columns || 80);
|
|
100515
|
+
rowEntries.forEach((entries, idx) => {
|
|
100516
|
+
if (idx > 0) console.log(import_chalk2.default.cyan("\u2500".repeat(separatorLen)));
|
|
100517
|
+
for (const [key, value] of entries) {
|
|
100518
|
+
const paddedKey = key.padEnd(maxKeyLen);
|
|
100519
|
+
console.log(`${import_chalk2.default.yellow.bold(paddedKey)} ${value}`);
|
|
100520
|
+
}
|
|
100521
|
+
});
|
|
100522
|
+
return;
|
|
100523
|
+
}
|
|
100524
|
+
const columns = allKeys;
|
|
100525
|
+
const def = allKeys.reduce((result, key) => {
|
|
100426
100526
|
result[key] = "-";
|
|
100427
100527
|
return result;
|
|
100428
100528
|
}, {});
|
|
100429
100529
|
const normalizedData = rows.map((item) => ({ ...def, ...item }));
|
|
100430
|
-
const columns = Object.keys(normalizedData[0]);
|
|
100431
100530
|
const table = new import_cli_table3.default({
|
|
100432
100531
|
head: columns.map((c) => import_chalk2.default.cyan.italic.bold(c)),
|
|
100532
|
+
colWidths: columns.map(() => null),
|
|
100533
|
+
wordWrap: false,
|
|
100433
100534
|
chars: {
|
|
100434
100535
|
top: " ",
|
|
100435
100536
|
"top-mid": " ",
|
|
@@ -100451,15 +100552,7 @@ var drawTable = (data) => {
|
|
|
100451
100552
|
normalizedData.forEach((row) => {
|
|
100452
100553
|
const rowValues = [];
|
|
100453
100554
|
for (const key of columns) {
|
|
100454
|
-
|
|
100455
|
-
rowValues.push("-");
|
|
100456
|
-
} else if (Array.isArray(row[key])) {
|
|
100457
|
-
rowValues.push(JSON.stringify(row[key]));
|
|
100458
|
-
} else if (typeof row[key] === "object") {
|
|
100459
|
-
rowValues.push(JSON.stringify(row[key]));
|
|
100460
|
-
} else {
|
|
100461
|
-
rowValues.push(String(row[key]));
|
|
100462
|
-
}
|
|
100555
|
+
rowValues.push(formatCellValue(row[key]));
|
|
100463
100556
|
}
|
|
100464
100557
|
table.push(rowValues);
|
|
100465
100558
|
});
|
|
@@ -100575,7 +100668,7 @@ var commandDescriptions = {
|
|
|
100575
100668
|
locale: `The locale command allows you to customize your app based on your users' location.`,
|
|
100576
100669
|
sites: `The sites command allows you to view, create and manage your Appwrite Sites.`,
|
|
100577
100670
|
storage: `The storage command allows you to manage your project files.`,
|
|
100578
|
-
teams: `The teams command allows you to group users of your project to enable them to share read and write access to your project resources.`,
|
|
100671
|
+
teams: `The teams command allows you to group users of your project to enable them to share read and write access to your project resources. Requires a linked project. To manage console-level teams, use the 'organizations' command instead.`,
|
|
100579
100672
|
update: `The update command allows you to update the ${SDK_TITLE} CLI to the latest version.`,
|
|
100580
100673
|
users: `The users command allows you to manage your project users.`,
|
|
100581
100674
|
projects: `The projects command allows you to manage your projects, add platforms, manage API keys, Dev Keys etc.`,
|
|
@@ -100910,14 +101003,14 @@ var questionsInitProject = [
|
|
|
100910
101003
|
name: "project",
|
|
100911
101004
|
message: "What would you like to name your project?",
|
|
100912
101005
|
default: "My Awesome Project",
|
|
100913
|
-
when: (answer) => answer.start !== "existing"
|
|
101006
|
+
when: (answer) => whenOverride(answer) && answer.start !== "existing"
|
|
100914
101007
|
},
|
|
100915
101008
|
{
|
|
100916
101009
|
type: "input",
|
|
100917
101010
|
name: "id",
|
|
100918
101011
|
message: "What ID would you like to have for your project?",
|
|
100919
101012
|
default: "unique()",
|
|
100920
|
-
when: (answer) => answer.start !== "existing"
|
|
101013
|
+
when: (answer) => whenOverride(answer) && answer.start !== "existing"
|
|
100921
101014
|
},
|
|
100922
101015
|
{
|
|
100923
101016
|
type: "search-list",
|
|
@@ -106030,9 +106123,6 @@ var Schema = class {
|
|
|
106030
106123
|
});
|
|
106031
106124
|
/*! Bundled license information:
|
|
106032
106125
|
|
|
106033
|
-
safe-buffer/index.js:
|
|
106034
|
-
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
106035
|
-
|
|
106036
106126
|
undici/lib/fetch/body.js:
|
|
106037
106127
|
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
|
|
106038
106128
|
|