@squidcloud/cli 1.0.446 → 1.0.449
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/index.js +261 -36
- package/dist/resources/claude/skills/squid-development/SKILL.md +66 -2473
- package/dist/resources/claude/skills/squid-development/reference/admin.md +242 -0
- package/dist/resources/claude/skills/squid-development/reference/ai.md +773 -0
- package/dist/resources/claude/skills/squid-development/reference/api.md +87 -0
- package/dist/resources/claude/skills/squid-development/reference/backend.md +462 -0
- package/dist/resources/claude/skills/squid-development/reference/client.md +442 -0
- package/dist/resources/claude/skills/squid-development/reference/connectors.md +33 -0
- package/dist/resources/claude/skills/squid-development/reference/console.md +189 -0
- package/dist/resources/claude/skills/squid-development/reference/databases.md +472 -0
- package/dist/resources/claude/skills/squid-development/reference/openai.md +98 -0
- package/dist/resources/claude/skills/squid-development/reference/security.md +356 -0
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -21930,6 +21930,43 @@ module.exports = Array.isArray || function (arr) {
|
|
|
21930
21930
|
};
|
|
21931
21931
|
|
|
21932
21932
|
|
|
21933
|
+
/***/ },
|
|
21934
|
+
|
|
21935
|
+
/***/ 6102
|
|
21936
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
21937
|
+
|
|
21938
|
+
"use strict";
|
|
21939
|
+
__webpack_require__.r(__webpack_exports__);
|
|
21940
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21941
|
+
/* harmony export */ LOG_LEVELS: () => (/* binding */ e),
|
|
21942
|
+
/* harmony export */ createDateTimePipe: () => (/* binding */ g),
|
|
21943
|
+
/* harmony export */ createJsonPipe: () => (/* binding */ x),
|
|
21944
|
+
/* harmony export */ createJsonStringifyPipe: () => (/* binding */ P),
|
|
21945
|
+
/* harmony export */ createLogCachePipe: () => (/* binding */ O),
|
|
21946
|
+
/* harmony export */ createLogLevelFilterPipe: () => (/* binding */ V),
|
|
21947
|
+
/* harmony export */ createLogMessageFilterPipe: () => (/* binding */ N),
|
|
21948
|
+
/* harmony export */ createNoopPipe: () => (/* binding */ M),
|
|
21949
|
+
/* harmony export */ estimateArgsSizeByStringify: () => (/* binding */ L),
|
|
21950
|
+
/* harmony export */ generateUuidSimple: () => (/* binding */ v),
|
|
21951
|
+
/* harmony export */ getConsoleOverrides: () => (/* binding */ l),
|
|
21952
|
+
/* harmony export */ getDefaultDateTimePipeOptions: () => (/* binding */ f),
|
|
21953
|
+
/* harmony export */ getDefaultJsonPipeOptions: () => (/* binding */ h),
|
|
21954
|
+
/* harmony export */ getDefaultJsonSimplifierOptions: () => (/* binding */ y),
|
|
21955
|
+
/* harmony export */ getDefaultJsonStringifyPipeOptions: () => (/* binding */ S),
|
|
21956
|
+
/* harmony export */ getDefaultLogCachePipeOptions: () => (/* binding */ j),
|
|
21957
|
+
/* harmony export */ getLogMessageFilterPipeOptions: () => (/* binding */ I),
|
|
21958
|
+
/* harmony export */ getOriginalConsoleMethods: () => (/* binding */ u),
|
|
21959
|
+
/* harmony export */ installConsoleOverride: () => (/* binding */ o),
|
|
21960
|
+
/* harmony export */ installConsoleOverrides: () => (/* binding */ i),
|
|
21961
|
+
/* harmony export */ simplifyJson: () => (/* binding */ d),
|
|
21962
|
+
/* harmony export */ simplifyValue: () => (/* binding */ b),
|
|
21963
|
+
/* harmony export */ uninstallAllConsoleOverrides: () => (/* binding */ c),
|
|
21964
|
+
/* harmony export */ uninstallConsoleOverride: () => (/* binding */ s),
|
|
21965
|
+
/* harmony export */ uninstallConsoleOverrides: () => (/* binding */ a)
|
|
21966
|
+
/* harmony export */ });
|
|
21967
|
+
const e=["debug","error","info","log","trace","warn"],t=[],r=()=>{},n={debug:r,error:r,info:r,log:r,trace:r,warn:r};function o(e){i(...Array.isArray(e)?e:[e])}function i(...o){!function(){if(n.debug===r)for(const r of e)n[r]=console[r],console[r]=(...e)=>{var o,i,s;let a=r,c=e;for(const e of t){const t=e(a,...c);if(!t||(Array.isArray(t)?0===(null!==(o=null==t?void 0:t.length)&&void 0!==o?o:0):0===(null!==(s=null===(i=t.args)||void 0===i?void 0:i.length)&&void 0!==s?s:0)))return;Array.isArray(t)?c=t:(a=t.level,c=t.args)}n[a](...c)}}();for(const e of o)!t.includes(e)&&e.onInstall&&e.onInstall(),t.push(e)}function s(e){a(...Array.isArray(e)?e:[e])}function a(...o){for(const e of o)for(let r=t.indexOf(e);r>=0;r=t.indexOf(e)){const e=t.splice(r,1)[0];!t.includes(e)&&e.onUninstall&&e.onUninstall()}!function(){if(!(t.length>0)&&n.debug!==r)for(const t of e)console[t]=n[t],n[t]=r}()}function c(){for(const e of[...t])s(e)}function l(){return[...t]}function u(){if(n.debug!==r)return Object.assign({},n);const t={};for(const r of e)t[r]=console[r];return t}function f(){return{dateFormatter:e=>new Date(e).toISOString()}}function g({dateFormatter:e}=f()){return(t,...r)=>[e(Date.now()),...r]}function y(){return{maxDepthLimit:10,maxArrayLength:100,maxObjectPropertyCount:100,isIgnoredProperty:()=>!1,replacePropertyValue:(e,t)=>t,depthLimitValue:"[Depth limit ~]",arrayLengthLimitValue:"[Array, length: $length ~]",objectPropertyCountLimitValue:"[Object, properties: $count ~]",circularReferenceValue:"[Circular ~]",functionValue:"[Function ~]",symbolValue:"[Symbol ~]"}}const p={maxDepthLimit:10,maxArrayLength:100,maxObjectPropertyCount:100,isIgnoredProperty:()=>!1,replacePropertyValue:(e,t)=>t,depthLimitValue:"[Depth limit ~]",arrayLengthLimitValue:"[Array, length: $length ~]",objectPropertyCountLimitValue:"[Object, properties: $count ~]",circularReferenceValue:"[Circular ~]",functionValue:"[Function ~]",symbolValue:"[Symbol ~]"},m=["cause","message","name","stack"];function d(e,t={},r=0,n=new Set){const o=Object.assign(Object.assign({},p),t);if(r>o.maxDepthLimit)return o.depthLimitValue;if("string"==typeof(e=b(e))||"boolean"==typeof e||"number"==typeof e||null==e)return e;if(n.has(e))return o.circularReferenceValue;if(n.add(e),Array.isArray(e))return e.length>o.maxArrayLength?o.arrayLengthLimitValue.replace("$length",`${e.length}`):e.map((e=>d(e,o,r+1,n)));const i=Object.entries(e);if(i.length>o.maxObjectPropertyCount)return o.objectPropertyCountLimitValue.replace("$count",`${i.length}`);const s={};for(const[e,t]of i)0===r&&o.isIgnoredProperty(e)||(s[e]=d(t,o,r+1,n));for(const t of m)if(!s[t]&&!o.isIgnoredProperty(t)){const i=e[t];void 0!==i&&(s[t]=d(i,o,r+1,n))}if(o.replacePropertyValue!==p.replacePropertyValue)for(const[e,t]of Object.entries(s))s[e]=o.replacePropertyValue(e,t);return s}function b(e,t={}){if(null==e)return e;switch(typeof e){case"undefined":case"boolean":case"string":return e;case"bigint":return`BigInt(${e.toString()})`;case"number":return isNaN(e)?"NaN":e===1/0?"Infinity":e===-1/0?"-Infinity":e;case"function":return t.functionValue||p.functionValue;case"symbol":return t.symbolValue||p.symbolValue;case"object":if(e instanceof Set)return[...e.keys()];if(e instanceof Map)return Object.fromEntries([...e.entries()]);if(e instanceof String||e instanceof Number||e instanceof Boolean)return e.valueOf();if(e instanceof Date)return e.toISOString()}return e}function h(){return Object.assign(Object.assign({},{maxDepthLimit:10,maxArrayLength:100,maxObjectPropertyCount:100,isIgnoredProperty:()=>!1,replacePropertyValue:(e,t)=>t,depthLimitValue:"[Depth limit ~]",arrayLengthLimitValue:"[Array, length: $length ~]",objectPropertyCountLimitValue:"[Object, properties: $count ~]",circularReferenceValue:"[Circular ~]",functionValue:"[Function ~]",symbolValue:"[Symbol ~]"}),{messagePropertyName:"message",levelPropertyName:"level",levelPropertyFormatter:e=>e,timestampPropertyName:"timestamp",timestampPropertyFormatter:e=>new Date(e).toISOString(),messageIdPropertyName:"message_id",messageIdPropertyProvider:v,isIgnoredProperty:()=>!1,getObjectMessageToken:e=>`$${e+1}`,pickFieldNameAsObjectMessageTokenForSingleFieldObjects:!1,undefinedMessageValue:void 0})}function x(e={}){const t=h(),r=Object.assign(Object.assign({},t),e);let n,o="";const i=(e,...i)=>{const s={};let a;s[r.messagePropertyName]=void 0;let c=0;for(let e=0;e<i.length;e++){const t=b(i[e]);let n=t;if("object"==typeof t&&null!==t){let o=d(t,r);if(r.pickFieldNameAsObjectMessageTokenForSingleFieldObjects&&"object"==typeof o&&null!==o){const e=Object.entries(o);if(1===e.length){const[t,r]=e[0],i=`$${t}`;if(void 0===s[i])if(n=i,null===(l=r)||"string"==typeof l||void 0===l||"number"==typeof l||"boolean"==typeof l){const e="string"==typeof r?"'":"";n+=`:[${e}${r}${e}]`,o=void 0}else o=r}}"string"!=typeof n&&(n=r.getObjectMessageToken(c,t,e),c++),s[n]=o}else void 0===t?void 0!==r.undefinedMessageValue&&(n+=r.undefinedMessageValue):n=t;a=void 0===a?`${n}`:`${a} ${n}`}var l;if(a&&(s[r.messagePropertyName]=a),r.levelPropertyName&&(s[r.levelPropertyName]=r.levelPropertyFormatter(e)),r.timestampPropertyName&&(s[r.timestampPropertyName]=r.timestampPropertyFormatter(Date.now())),r.messageIdPropertyName){let a=n||r.messageIdPropertyProvider(e,...i);void 0===a&&(a=t.messageIdPropertyProvider()),o=a,s[r.messageIdPropertyName]=o,n=void 0}return[s]};return i.getLastMessageId=()=>o,i.setNextMessageId=e=>{n=e},i}function v(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const r=(e+Math.floor(16*Math.random()))%16;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))}function S(){return Object.assign(Object.assign({},h()),{preStringifyCallback:()=>{}})}function P(e={}){const t=Object.assign(Object.assign({},S()),e),r=x(t),n=(e,...n)=>{const o=r(e,...n);if(0===o.length)return[];const i=o[0];return t.preStringifyCallback(i),[JSON.stringify(i)]};return n.getLastMessageId=r.getLastMessageId,n.setNextMessageId=r.setNextMessageId,n}function j(){return{cacheSize:1e3,cacheSizeByStringify:-1}}function O(e={}){const t=Object.assign(Object.assign({},{cacheSize:1e3,cacheSizeByStringify:-1}),e);if(t.cacheSize<0||isNaN(t.cacheSize))throw new Error(`Invalid cache size: ${t.cacheSize}`);const r={size:0};let n=!1,o=0;function i(){r.first&&(o>0&&(o-=L(...r.first.value.args)),r.first=r.first.next,r.size--)}const s=(e,...a)=>{if(0===t.cacheSize||n)return a;var c;c={value:{level:e,args:a,timestamp:Date.now()}},void 0===r.last?r.first=c:r.last.next=c,r.last=c,r.size++,t.cacheSizeByStringify>=0&&(o+=L(...c.value.args));const l=r.size>t.cacheSize,u=t.cacheSizeByStringify>=0&&o>t.cacheSizeByStringify;if((l||u)&&t.onCacheSizeReached){n=!0;try{t.onCacheSizeReached(s)}finally{n=!1}}if(u){for(;o>t.cacheSizeByStringify&&void 0!==r.first;)i();o=Math.max(o,0),void 0===r.first&&(o=0)}else l&&i();return a};return s.getMessages=()=>{const e=[];let t=r.first;for(;void 0!==t;)e.push(t.value),t=t.next;return e},s.clearMessages=()=>{r.first=void 0,r.last=void 0,r.size=0,o=0},s.onInstall=()=>s.clearMessages(),s}function L(...e){let t=0;for(const r of e)void 0!==r&&(t+=JSON.stringify(d(r)).length);return t}function V(e={}){const t=Object.assign({excludedLogLevels:[]},e);return(e,...r)=>{const n="function"==typeof t.excludedLogLevels?t.excludedLogLevels(e):t.excludedLogLevels;return("boolean"==typeof n?n:n.includes(e))?[]:r}}function I(){return{isCaseSensitive:!1,excludedMessageTokens:[]}}function N(e){const{excludedMessageTokens:t,isCaseSensitive:r}=Object.assign(Object.assign({},{isCaseSensitive:!1,excludedMessageTokens:[]}),e),n=t.filter((e=>"string"==typeof e)).map((e=>r?e:e.toLowerCase())),o=t.filter((e=>"object"==typeof e));return t.sort(((e,t)=>typeof e==typeof t?0:"string"==typeof e?-1:1)),(e,...i)=>{if(0===t.length)return i;if(r){for(const e of i)if("string"==typeof e){if(n.some((t=>e.includes(t))))return[];if(o.some((t=>t.test(e))))return[]}}else for(const e of i)if("string"==typeof e){const t=e.toLowerCase();if(n.some((e=>t.includes(e))))return[];if(o.some((t=>t.test(e))))return[]}return i}}function M(){return(e,...t)=>t}
|
|
21968
|
+
//# sourceMappingURL=index.esm.js.map
|
|
21969
|
+
|
|
21933
21970
|
/***/ },
|
|
21934
21971
|
|
|
21935
21972
|
/***/ 2577
|
|
@@ -29662,9 +29699,7 @@ exports.GROK_CHAT_MODEL_NAMES = ['grok-4', 'grok-4-1-fast-reasoning', 'grok-4-1-
|
|
|
29662
29699
|
exports.ANTHROPIC_CHAT_MODEL_NAMES = [
|
|
29663
29700
|
'claude-haiku-4-5-20251001',
|
|
29664
29701
|
'claude-opus-4-6',
|
|
29665
|
-
'claude-opus-4-5-20251101',
|
|
29666
29702
|
'claude-sonnet-4-6',
|
|
29667
|
-
'claude-sonnet-4-5-20250929',
|
|
29668
29703
|
];
|
|
29669
29704
|
/**
|
|
29670
29705
|
* The supported AI model names.
|
|
@@ -30185,6 +30220,148 @@ exports.applicationAppConnectorsAssertion = {
|
|
|
30185
30220
|
};
|
|
30186
30221
|
|
|
30187
30222
|
|
|
30223
|
+
/***/ },
|
|
30224
|
+
|
|
30225
|
+
/***/ 8700
|
|
30226
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
30227
|
+
|
|
30228
|
+
"use strict";
|
|
30229
|
+
|
|
30230
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
30231
|
+
exports.debugLogFilterPipe = void 0;
|
|
30232
|
+
const logpipes_1 = __webpack_require__(6102);
|
|
30233
|
+
const enable_debug_logs_decorator_1 = __webpack_require__(5692);
|
|
30234
|
+
const global_utils_1 = __webpack_require__(6334);
|
|
30235
|
+
exports.debugLogFilterPipe = (0, logpipes_1.createLogLevelFilterPipe)({
|
|
30236
|
+
excludedLogLevels: level => {
|
|
30237
|
+
if (level !== 'debug')
|
|
30238
|
+
return false;
|
|
30239
|
+
if ((0, global_utils_1.isDebugEnabled)())
|
|
30240
|
+
return false; // Debug is enabled globally.
|
|
30241
|
+
return !(0, enable_debug_logs_decorator_1.isInDebugDecoratorContext)(); // Check if debug is enabled only for this nested call.
|
|
30242
|
+
},
|
|
30243
|
+
});
|
|
30244
|
+
|
|
30245
|
+
|
|
30246
|
+
/***/ },
|
|
30247
|
+
|
|
30248
|
+
/***/ 5692
|
|
30249
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
30250
|
+
|
|
30251
|
+
"use strict";
|
|
30252
|
+
|
|
30253
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
30254
|
+
exports.EnableDebugLogs = EnableDebugLogs;
|
|
30255
|
+
exports.isInDebugDecoratorContext = isInDebugDecoratorContext;
|
|
30256
|
+
const async_hooks_1 = __webpack_require__(290);
|
|
30257
|
+
const store = new async_hooks_1.AsyncLocalStorage();
|
|
30258
|
+
/**
|
|
30259
|
+
* Method decorator that enables debug logs only within the async context of the decorated method call.
|
|
30260
|
+
* This allows debug logging to be scoped to specific method executions without affecting global debug settings.
|
|
30261
|
+
* Works by making isInDebugContext() return true within the decorated context.
|
|
30262
|
+
*
|
|
30263
|
+
* Note: the decoration works only in Node.js.
|
|
30264
|
+
*/
|
|
30265
|
+
function EnableDebugLogs(_target, _propertyName, descriptor) {
|
|
30266
|
+
const method = descriptor.value;
|
|
30267
|
+
descriptor.value = async function (...args) {
|
|
30268
|
+
// Run the method within the debug context.
|
|
30269
|
+
return store.run(true, async () => {
|
|
30270
|
+
return await method.apply(this, args);
|
|
30271
|
+
});
|
|
30272
|
+
};
|
|
30273
|
+
return descriptor;
|
|
30274
|
+
}
|
|
30275
|
+
/** Returns true if called from within debug log enabled context. */
|
|
30276
|
+
function isInDebugDecoratorContext() {
|
|
30277
|
+
return store.getStore() === true;
|
|
30278
|
+
}
|
|
30279
|
+
|
|
30280
|
+
|
|
30281
|
+
/***/ },
|
|
30282
|
+
|
|
30283
|
+
/***/ 6334
|
|
30284
|
+
(__unused_webpack_module, exports) {
|
|
30285
|
+
|
|
30286
|
+
"use strict";
|
|
30287
|
+
|
|
30288
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
30289
|
+
exports.DebugLogger = void 0;
|
|
30290
|
+
exports.getGlobal = getGlobal;
|
|
30291
|
+
exports.isDebugEnabled = isDebugEnabled;
|
|
30292
|
+
exports.enableDebugLogs = enableDebugLogs;
|
|
30293
|
+
exports.disableTimestampsInLog = disableTimestampsInLog;
|
|
30294
|
+
/** @internal */
|
|
30295
|
+
function getGlobal() {
|
|
30296
|
+
if (typeof window !== 'undefined') {
|
|
30297
|
+
return window; // Browser environment.
|
|
30298
|
+
}
|
|
30299
|
+
if (typeof global !== 'undefined') {
|
|
30300
|
+
return global; // Node.js environment.
|
|
30301
|
+
}
|
|
30302
|
+
if (typeof self !== 'undefined') {
|
|
30303
|
+
return self; // Web Worker environment.
|
|
30304
|
+
}
|
|
30305
|
+
throw new Error('Unable to locate global object');
|
|
30306
|
+
}
|
|
30307
|
+
/** @internal */
|
|
30308
|
+
function isDebugEnabled() {
|
|
30309
|
+
const globalObj = getGlobal();
|
|
30310
|
+
return globalObj?.['SQUID_LOG_DEBUG_ENABLED'] === true;
|
|
30311
|
+
}
|
|
30312
|
+
/** @internal */
|
|
30313
|
+
function enableDebugLogs(isEnabled = true) {
|
|
30314
|
+
const globalObj = getGlobal();
|
|
30315
|
+
globalObj['SQUID_LOG_DEBUG_ENABLED'] = isEnabled;
|
|
30316
|
+
}
|
|
30317
|
+
function isSquidDebugEnabledByDefault() {
|
|
30318
|
+
let param = '';
|
|
30319
|
+
if (typeof window !== 'undefined' && window.location) {
|
|
30320
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
30321
|
+
param = searchParams.get('SQUID_DEBUG') || '';
|
|
30322
|
+
}
|
|
30323
|
+
else if (typeof process !== 'undefined' && process.env) {
|
|
30324
|
+
param = process.env['SQUID_DEBUG'] || '';
|
|
30325
|
+
}
|
|
30326
|
+
return param === '1' || param === 'true';
|
|
30327
|
+
}
|
|
30328
|
+
enableDebugLogs(isSquidDebugEnabledByDefault());
|
|
30329
|
+
/** @internal */
|
|
30330
|
+
function disableTimestampsInLog() {
|
|
30331
|
+
const globalObj = getGlobal();
|
|
30332
|
+
globalObj['SQUID_LOG_TIMESTAMPS_DISABLED'] = true;
|
|
30333
|
+
}
|
|
30334
|
+
function isTimestampsEnabled() {
|
|
30335
|
+
const globalObj = getGlobal();
|
|
30336
|
+
return globalObj?.['SQUID_LOG_TIMESTAMPS_DISABLED'] !== true;
|
|
30337
|
+
}
|
|
30338
|
+
/**
|
|
30339
|
+
* This class is used by the @squidcloud/client code.
|
|
30340
|
+
* We can’t override console.debug() with "logpipes" as we do for the core or tenant
|
|
30341
|
+
* because @squidcloud/client code is run in user environment.
|
|
30342
|
+
* Therefore, when we want to log anything from the client code, we use this logger.
|
|
30343
|
+
*
|
|
30344
|
+
* @internal.
|
|
30345
|
+
*/
|
|
30346
|
+
class DebugLogger {
|
|
30347
|
+
static debug(...args) {
|
|
30348
|
+
if (!isDebugEnabled())
|
|
30349
|
+
return;
|
|
30350
|
+
console.debug(`${getLogPrefixString()} DEBUG`, ...args);
|
|
30351
|
+
}
|
|
30352
|
+
}
|
|
30353
|
+
exports.DebugLogger = DebugLogger;
|
|
30354
|
+
function getLogPrefixString() {
|
|
30355
|
+
if (isTimestampsEnabled()) {
|
|
30356
|
+
const date = new Date();
|
|
30357
|
+
return `[${date.toLocaleTimeString()}.${date.getMilliseconds()}] squid`;
|
|
30358
|
+
}
|
|
30359
|
+
else {
|
|
30360
|
+
return 'squid';
|
|
30361
|
+
}
|
|
30362
|
+
}
|
|
30363
|
+
|
|
30364
|
+
|
|
30188
30365
|
/***/ },
|
|
30189
30366
|
|
|
30190
30367
|
/***/ 866
|
|
@@ -30203,7 +30380,6 @@ exports.KOTLIN_CONTROLLERS = [
|
|
|
30203
30380
|
'application-kotlin',
|
|
30204
30381
|
'auth',
|
|
30205
30382
|
'backend-function',
|
|
30206
|
-
'connector',
|
|
30207
30383
|
'integration',
|
|
30208
30384
|
'internal-storage',
|
|
30209
30385
|
'internalCodeExecutor',
|
|
@@ -30220,7 +30396,6 @@ exports.KOTLIN_CONTROLLERS = [
|
|
|
30220
30396
|
'storage',
|
|
30221
30397
|
'webhooks',
|
|
30222
30398
|
'ws',
|
|
30223
|
-
'personalStorage',
|
|
30224
30399
|
'internal-extraction',
|
|
30225
30400
|
'notification',
|
|
30226
30401
|
];
|
|
@@ -30270,6 +30445,38 @@ function isIOS(regionPrefix) {
|
|
|
30270
30445
|
}
|
|
30271
30446
|
|
|
30272
30447
|
|
|
30448
|
+
/***/ },
|
|
30449
|
+
|
|
30450
|
+
/***/ 9590
|
|
30451
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
30452
|
+
|
|
30453
|
+
"use strict";
|
|
30454
|
+
|
|
30455
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
30456
|
+
exports.timeSince = timeSince;
|
|
30457
|
+
exports.timePeriod = timePeriod;
|
|
30458
|
+
/*** The file contains logging helper methods. Used to reduce boilerplate code in logging functions. */
|
|
30459
|
+
const time_units_1 = __webpack_require__(1929);
|
|
30460
|
+
/**
|
|
30461
|
+
* Returns a formatted time duration string for the period from Date.now() to `startDate`.
|
|
30462
|
+
* Example "in 12s".
|
|
30463
|
+
* */
|
|
30464
|
+
function timeSince(startTime, prefix) {
|
|
30465
|
+
return timePeriod(Date.now() - startTime, prefix);
|
|
30466
|
+
}
|
|
30467
|
+
/**
|
|
30468
|
+
* Returns a formatted of duration of the `periodInMillis`.
|
|
30469
|
+
* Example "in 12s".
|
|
30470
|
+
* */
|
|
30471
|
+
function timePeriod(periodInMillis, prefix) {
|
|
30472
|
+
prefix = prefix === undefined ? 'time: ' : prefix;
|
|
30473
|
+
if (periodInMillis < time_units_1.MILLIS_PER_SECOND) {
|
|
30474
|
+
return `${prefix}${periodInMillis}ms`;
|
|
30475
|
+
}
|
|
30476
|
+
return `${prefix}${periodInMillis / time_units_1.MILLIS_PER_SECOND}s`;
|
|
30477
|
+
}
|
|
30478
|
+
|
|
30479
|
+
|
|
30273
30480
|
/***/ },
|
|
30274
30481
|
|
|
30275
30482
|
/***/ 3563
|
|
@@ -31014,12 +31221,16 @@ const adm_zip_1 = __importDefault(__webpack_require__(8023));
|
|
|
31014
31221
|
const assertic_1 = __webpack_require__(3205);
|
|
31015
31222
|
const fsSync = __importStar(__webpack_require__(9896));
|
|
31016
31223
|
const fs_1 = __webpack_require__(9896);
|
|
31224
|
+
const logpipes_1 = __webpack_require__(6102);
|
|
31017
31225
|
const module_1 = __webpack_require__(3339);
|
|
31018
31226
|
const node_child_process_1 = __webpack_require__(1421);
|
|
31019
31227
|
const path_1 = __importDefault(__webpack_require__(6928));
|
|
31020
31228
|
const webpack_1 = __importDefault(__webpack_require__(6807));
|
|
31021
31229
|
const connector_types_1 = __webpack_require__(3420);
|
|
31022
31230
|
const assertion_utils_1 = __webpack_require__(6883);
|
|
31231
|
+
const enable_debug_decorator_utils_1 = __webpack_require__(8700);
|
|
31232
|
+
const global_utils_1 = __webpack_require__(6334);
|
|
31233
|
+
const log_utils_1 = __webpack_require__(9590);
|
|
31023
31234
|
const openapi_utils_1 = __webpack_require__(3563);
|
|
31024
31235
|
const process_env_utils_1 = __webpack_require__(9360);
|
|
31025
31236
|
const resolve_1 = __webpack_require__(412);
|
|
@@ -31046,8 +31257,10 @@ async function displayVersionWarning(versionCheckPromise) {
|
|
|
31046
31257
|
catch (_ignored) { }
|
|
31047
31258
|
}
|
|
31048
31259
|
async function build({ verbose, dev, skipVersionCheck }) {
|
|
31049
|
-
|
|
31050
|
-
|
|
31260
|
+
const buildPhaseStart = Date.now();
|
|
31261
|
+
(0, global_utils_1.enableDebugLogs)(verbose || (0, global_utils_1.isDebugEnabled)());
|
|
31262
|
+
(0, logpipes_1.installConsoleOverrides)(enable_debug_decorator_utils_1.debugLogFilterPipe);
|
|
31263
|
+
console.debug(`Starting Squid project build. CLI package version: ${packageJson.version}`);
|
|
31051
31264
|
await (0, validate_1.validateSquidProject)();
|
|
31052
31265
|
// Start version checks in the background if not disabled.
|
|
31053
31266
|
const shouldSkipVersionCheck = skipVersionCheck || (0, process_env_utils_1.isEnvVarTruthy)('SQUID_SKIP_BUILD_TIME_VERSION_CHECK');
|
|
@@ -31056,27 +31269,29 @@ async function build({ verbose, dev, skipVersionCheck }) {
|
|
|
31056
31269
|
const versionCheckPromise = shouldSkipVersionCheck ? Promise.resolve(undefined) : (0, version_check_1.checkCliVersion)(currentVersion);
|
|
31057
31270
|
const distPath = path_1.default.resolve(process.cwd(), 'dist');
|
|
31058
31271
|
if (fsSync.existsSync(distPath)) {
|
|
31059
|
-
|
|
31060
|
-
console.log(`Cleaning existing dist dir before the build: ${distPath}`);
|
|
31272
|
+
console.debug(`Cleaning existing dist dir before the build: ${distPath}`);
|
|
31061
31273
|
await fs_1.promises.rm(distPath, { recursive: true, force: true });
|
|
31062
31274
|
}
|
|
31063
31275
|
await fs_1.promises.mkdir(distPath);
|
|
31064
31276
|
const isSquidConnector = (0, process_env_utils_1.isEnvVarTruthy)('SQUID_CONNECTOR');
|
|
31277
|
+
const specsStart = Date.now();
|
|
31065
31278
|
const openApiSpecAndControllers = await tsoa_utils_1.TsoaUtils.generateAllSpecs(verbose, !isSquidConnector);
|
|
31279
|
+
console.debug((0, log_utils_1.timeSince)(specsStart, '⏱ TsoaUtils.generateAllSpecs '));
|
|
31066
31280
|
await fs_1.promises.writeFile(path_1.default.join(distPath, '', 'openapi-spec-and-controllers.json'), JSON.stringify(openApiSpecAndControllers));
|
|
31067
31281
|
const isUserConfigMode = fsSync.existsSync(resolve_2.USER_WEBPACK_CONFIG_PATH);
|
|
31068
31282
|
const webpackConfigPath = isUserConfigMode ? resolve_2.USER_WEBPACK_CONFIG_PATH : resolve_2.BUILT_IN_WEBPACK_CONFIG_PATH;
|
|
31069
|
-
|
|
31070
|
-
console.log(`Using webpack config from ${webpackConfigPath}`);
|
|
31283
|
+
console.debug(`Using webpack config from ${webpackConfigPath}`);
|
|
31071
31284
|
const localConfig = (0, resolve_1.requirePath)(webpackConfigPath);
|
|
31072
31285
|
const mode = dev ? 'development' : 'production';
|
|
31073
31286
|
const webpackConfig = localConfig(undefined, { mode });
|
|
31074
31287
|
webpackConfig.mode = webpackConfig.mode || mode;
|
|
31075
31288
|
try {
|
|
31076
31289
|
console.log((0, logging_1.primary)('Building...'));
|
|
31290
|
+
const webpackStart = Date.now();
|
|
31077
31291
|
await new Promise((resolve, reject) => {
|
|
31078
31292
|
(0, webpack_1.default)(webpackConfig, (err, stats) => {
|
|
31079
31293
|
if (err) {
|
|
31294
|
+
console.debug((0, log_utils_1.timeSince)(webpackStart, '⏱ webpack build '));
|
|
31080
31295
|
console.error('Build failed a fatal error.');
|
|
31081
31296
|
return reject(err);
|
|
31082
31297
|
}
|
|
@@ -31093,34 +31308,36 @@ async function build({ verbose, dev, skipVersionCheck }) {
|
|
|
31093
31308
|
}));
|
|
31094
31309
|
}
|
|
31095
31310
|
if (stats?.hasErrors()) {
|
|
31311
|
+
console.debug((0, log_utils_1.timeSince)(webpackStart, '⏱ webpack build '));
|
|
31096
31312
|
return reject(new Error('Build failed with errors.'));
|
|
31097
31313
|
}
|
|
31314
|
+
console.debug((0, log_utils_1.timeSince)(webpackStart, '⏱ webpack build '));
|
|
31098
31315
|
console.log('Build succeeded.');
|
|
31099
31316
|
resolve();
|
|
31100
31317
|
});
|
|
31101
31318
|
});
|
|
31102
31319
|
// Generate connector metadata if this is a connector build.
|
|
31103
31320
|
if (isSquidConnector) {
|
|
31104
|
-
|
|
31105
|
-
|
|
31106
|
-
await generateConnectorMetadata(distPath
|
|
31321
|
+
console.debug('Generating connector metadata...');
|
|
31322
|
+
const metadataStart = Date.now();
|
|
31323
|
+
await generateConnectorMetadata(distPath);
|
|
31324
|
+
console.debug((0, log_utils_1.timeSince)(metadataStart, '⏱ generateConnectorMetadata '));
|
|
31107
31325
|
// Add metadata to bundle.zip.
|
|
31108
31326
|
const zipPath = path_1.default.join(distPath, 'bundle.zip');
|
|
31109
31327
|
const zip = new adm_zip_1.default(zipPath);
|
|
31110
31328
|
zip.addLocalFile(path_1.default.join(distPath, connector_types_1.CONNECTOR_METADATA_JSON_FILE));
|
|
31111
31329
|
zip.writeZip(zipPath);
|
|
31112
|
-
|
|
31113
|
-
console.log('Added connector metadata to bundle.zip');
|
|
31330
|
+
console.debug('Added connector metadata to bundle.zip');
|
|
31114
31331
|
}
|
|
31115
31332
|
// Show version check warning after successful build.
|
|
31116
31333
|
await displayVersionWarning(versionCheckPromise);
|
|
31334
|
+
console.debug((0, log_utils_1.timeSince)(buildPhaseStart, '⏱ Total CLI build time '));
|
|
31117
31335
|
}
|
|
31118
31336
|
catch (e) {
|
|
31119
31337
|
// Show a version check warning even if the build failed.
|
|
31120
31338
|
await displayVersionWarning(versionCheckPromise);
|
|
31121
31339
|
const errorMessage = (0, assertic_1.getMessageFromError)(e);
|
|
31122
|
-
|
|
31123
|
-
console.log(`Exiting with error: ${errorMessage}`);
|
|
31340
|
+
console.debug(`Exiting with error: ${errorMessage}`);
|
|
31124
31341
|
(0, process_utils_1.exitWithError)(errorMessage);
|
|
31125
31342
|
}
|
|
31126
31343
|
}
|
|
@@ -31129,7 +31346,7 @@ async function build({ verbose, dev, skipVersionCheck }) {
|
|
|
31129
31346
|
*/
|
|
31130
31347
|
const INTEGRATIONLESS_CONNECTORS = ['cotomi'];
|
|
31131
31348
|
/** Generates connector metadata JSON file in the dist directory. */
|
|
31132
|
-
async function generateConnectorMetadata(distPath
|
|
31349
|
+
async function generateConnectorMetadata(distPath) {
|
|
31133
31350
|
const packageJsonPath = path_1.default.resolve(process.cwd(), 'package.json');
|
|
31134
31351
|
const packageJson = JSON.parse(await fs_1.promises.readFile(packageJsonPath, 'utf8'));
|
|
31135
31352
|
(0, assertic_1.assertTruthy)(packageJson.version, 'Failed to read version from package.json');
|
|
@@ -31152,8 +31369,7 @@ async function generateConnectorMetadata(distPath, verbose) {
|
|
|
31152
31369
|
(0, assertic_1.assertTruthy)(typeof bundleData === 'object', `Unexpected "default:metadata" function response: ${typeof bundleData}`);
|
|
31153
31370
|
// Populate openApiControllersMap from openapi-spec-and-controllers.json.
|
|
31154
31371
|
await (0, openapi_utils_1.populateOpenApiControllersMap)(bundleData, distPath, 'connector');
|
|
31155
|
-
|
|
31156
|
-
console.log('Populated openApiControllersMap in bundle metadata');
|
|
31372
|
+
console.debug('Populated openApiControllersMap in bundle metadata');
|
|
31157
31373
|
const integrationTypes = INTEGRATIONLESS_CONNECTORS.includes(connectorId)
|
|
31158
31374
|
? []
|
|
31159
31375
|
: buildSupportedIntegrationTypesFromBundleData(bundleData);
|
|
@@ -31165,10 +31381,7 @@ async function generateConnectorMetadata(distPath, verbose) {
|
|
|
31165
31381
|
};
|
|
31166
31382
|
const metadataPath = path_1.default.join(distPath, connector_types_1.CONNECTOR_METADATA_JSON_FILE);
|
|
31167
31383
|
await fs_1.promises.writeFile(metadataPath, JSON.stringify(packageMetadata, null, 2));
|
|
31168
|
-
|
|
31169
|
-
console.log('Connector metadata generated successfully:');
|
|
31170
|
-
console.dir(packageMetadata, { depth: 2, colors: true });
|
|
31171
|
-
}
|
|
31384
|
+
console.debug('Connector metadata generated successfully:', packageMetadata);
|
|
31172
31385
|
}
|
|
31173
31386
|
/** Returns a list of supported integration types. Checks AI function attributes for that. */
|
|
31174
31387
|
function buildSupportedIntegrationTypesFromBundleData(bundleData) {
|
|
@@ -31224,12 +31437,17 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
31224
31437
|
exports.deploy = deploy;
|
|
31225
31438
|
const assertic_1 = __webpack_require__(3205);
|
|
31226
31439
|
const fs = __importStar(__webpack_require__(1943));
|
|
31440
|
+
const logpipes_1 = __webpack_require__(6102);
|
|
31227
31441
|
const communication_types_1 = __webpack_require__(3443);
|
|
31442
|
+
const enable_debug_decorator_utils_1 = __webpack_require__(8700);
|
|
31443
|
+
const global_utils_1 = __webpack_require__(6334);
|
|
31228
31444
|
const http_1 = __webpack_require__(866);
|
|
31229
31445
|
const shell_runner_1 = __webpack_require__(3089);
|
|
31230
31446
|
const environment_1 = __webpack_require__(722);
|
|
31231
31447
|
const process_utils_1 = __webpack_require__(8251);
|
|
31232
31448
|
async function deploy(consoleRegion, appId, bundlePath, apiKey, verbose, direct, isUserSpecifiedPath, skipBuild, internalApiKey, environmentId) {
|
|
31449
|
+
(0, global_utils_1.enableDebugLogs)(verbose || (0, global_utils_1.isDebugEnabled)());
|
|
31450
|
+
(0, logpipes_1.installConsoleOverrides)(enable_debug_decorator_utils_1.debugLogFilterPipe);
|
|
31233
31451
|
if (!direct && !isUserSpecifiedPath && !skipBuild) {
|
|
31234
31452
|
console.log('Building code bundle...');
|
|
31235
31453
|
await (0, shell_runner_1.runInShell)('npm run build');
|
|
@@ -31244,9 +31462,7 @@ async function deploy(consoleRegion, appId, bundlePath, apiKey, verbose, direct,
|
|
|
31244
31462
|
? (0, http_1.getApplicationUrl)(consoleRegion, appIdWithEnvId, 'application/updateApplicationCode')
|
|
31245
31463
|
: (0, http_1.getApplicationUrl)(consoleRegion, environment_1.environment.consoleAppId, 'webhooks/updateApplicationCode');
|
|
31246
31464
|
console.log(`Deploying code bundle for appId '${appId}' to the '${environmentId}' environment...`);
|
|
31247
|
-
|
|
31248
|
-
console.log('Deploying bundle to:', updateCodeUrl);
|
|
31249
|
-
}
|
|
31465
|
+
console.debug('Deploying bundle to:', updateCodeUrl);
|
|
31250
31466
|
try {
|
|
31251
31467
|
const headers = new Headers();
|
|
31252
31468
|
if (apiKey) {
|
|
@@ -31263,9 +31479,7 @@ async function deploy(consoleRegion, appId, bundlePath, apiKey, verbose, direct,
|
|
|
31263
31479
|
console.log('Code deployed');
|
|
31264
31480
|
}
|
|
31265
31481
|
catch (error) {
|
|
31266
|
-
|
|
31267
|
-
console.error('VERBOSE: error deploying bundle:', error);
|
|
31268
|
-
}
|
|
31482
|
+
console.debug('Error deploying bundle:', error);
|
|
31269
31483
|
const errorMessage = (0, assertic_1.getMessageFromError)(error, '');
|
|
31270
31484
|
(0, process_utils_1.exitWithError)('Unable to deploy bundle:', errorMessage || error);
|
|
31271
31485
|
}
|
|
@@ -31766,9 +31980,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
31766
31980
|
exports.initSample = initSample;
|
|
31767
31981
|
const assertic_1 = __webpack_require__(3205);
|
|
31768
31982
|
const promises_1 = __importDefault(__webpack_require__(1943));
|
|
31983
|
+
const logpipes_1 = __webpack_require__(6102);
|
|
31769
31984
|
const path_1 = __importDefault(__webpack_require__(6928));
|
|
31770
31985
|
const communication_types_1 = __webpack_require__(3443);
|
|
31771
31986
|
const utils_1 = __webpack_require__(1215);
|
|
31987
|
+
const enable_debug_decorator_utils_1 = __webpack_require__(8700);
|
|
31988
|
+
const global_utils_1 = __webpack_require__(6334);
|
|
31772
31989
|
const shell_runner_1 = __webpack_require__(3089);
|
|
31773
31990
|
const git_utils_1 = __webpack_require__(954);
|
|
31774
31991
|
const logging_1 = __webpack_require__(443);
|
|
@@ -31776,6 +31993,8 @@ const process_utils_1 = __webpack_require__(8251);
|
|
|
31776
31993
|
const report_utils_1 = __webpack_require__(3066);
|
|
31777
31994
|
const ORG = 'squid-cloud-samples';
|
|
31778
31995
|
async function initSample(consoleRegion, isOnPremConsole, dirPath, appId, apiKey, environmentId, squidDeveloperId, region, templateName, verbose = false) {
|
|
31996
|
+
(0, global_utils_1.enableDebugLogs)(verbose || (0, global_utils_1.isDebugEnabled)());
|
|
31997
|
+
(0, logpipes_1.installConsoleOverrides)(enable_debug_decorator_utils_1.debugLogFilterPipe);
|
|
31779
31998
|
try {
|
|
31780
31999
|
await promises_1.default.stat(path_1.default.resolve(dirPath));
|
|
31781
32000
|
(0, process_utils_1.exitWithError)(`Project already exists: ${dirPath}`);
|
|
@@ -31879,7 +32098,7 @@ ${(0, logging_1.primary)('Done. Now run:')}
|
|
|
31879
32098
|
cd ${dirPath}
|
|
31880
32099
|
npm run start
|
|
31881
32100
|
`);
|
|
31882
|
-
await (0, report_utils_1.reportLocalBackendInitialized)(consoleRegion, (0, communication_types_1.appIdWithEnvironmentIdAndDevId)(appId, environmentId, squidDeveloperId), apiKey
|
|
32101
|
+
await (0, report_utils_1.reportLocalBackendInitialized)(consoleRegion, (0, communication_types_1.appIdWithEnvironmentIdAndDevId)(appId, environmentId, squidDeveloperId), apiKey);
|
|
31883
32102
|
}
|
|
31884
32103
|
else {
|
|
31885
32104
|
console.log((0, logging_1.link)('https://console.getsquid.ai'));
|
|
@@ -32173,11 +32392,9 @@ exports.reportLocalBackendInitialized = reportLocalBackendInitialized;
|
|
|
32173
32392
|
const assertic_1 = __webpack_require__(3205);
|
|
32174
32393
|
const http_1 = __webpack_require__(866);
|
|
32175
32394
|
const environment_1 = __webpack_require__(722);
|
|
32176
|
-
async function reportLocalBackendInitialized(consoleRegion, appId, apiKey
|
|
32395
|
+
async function reportLocalBackendInitialized(consoleRegion, appId, apiKey) {
|
|
32177
32396
|
const url = `${(0, http_1.getApplicationUrl)(consoleRegion, environment_1.environment.consoleAppId, 'webhooks/reportLocalBackendInitialized')}`;
|
|
32178
|
-
|
|
32179
|
-
console.log('Reporting backend initialization to Squid Console...', url);
|
|
32180
|
-
}
|
|
32397
|
+
console.debug('Reporting backend initialization to Squid Console...', url);
|
|
32181
32398
|
try {
|
|
32182
32399
|
const headers = new Headers();
|
|
32183
32400
|
headers.append('Authorization', `ApiKey ${apiKey}`);
|
|
@@ -33986,6 +34203,14 @@ module.exports = require("assert");
|
|
|
33986
34203
|
|
|
33987
34204
|
/***/ },
|
|
33988
34205
|
|
|
34206
|
+
/***/ 290
|
|
34207
|
+
(module) {
|
|
34208
|
+
|
|
34209
|
+
"use strict";
|
|
34210
|
+
module.exports = require("async_hooks");
|
|
34211
|
+
|
|
34212
|
+
/***/ },
|
|
34213
|
+
|
|
33989
34214
|
/***/ 181
|
|
33990
34215
|
(module) {
|
|
33991
34216
|
|
|
@@ -36712,7 +36937,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"seek-bzip","version":"1.0.6",
|
|
|
36712
36937
|
(module) {
|
|
36713
36938
|
|
|
36714
36939
|
"use strict";
|
|
36715
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.
|
|
36940
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.449","description":"The Squid CLI","main":"dist/index.js","scripts":{"start":"node dist/index.js","start-ts":"ts-node -r tsconfig-paths/register src/index.ts","prebuild":"rimraf dist","build":"webpack --mode=production","build:dev":"webpack --mode=development","lint":"eslint","link":"npm run build && chmod 755 dist/index.js && npm link","watch":"webpack --watch","deploy":"npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz","publish:public":"npm run build && npm publish --access public"},"files":["dist/**/*"],"bin":{"squid":"dist/index.js"},"keywords":[],"author":"","license":"ISC","engines":{"node":">=18.0.0"},"dependencies":{"@squidcloud/local-backend":"^1.0.449","adm-zip":"^0.5.16","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","logpipes":"^1.11.0","nodemon":"^3.1.9","terser-webpack-plugin":"^5.3.10","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.101.3","zip-webpack-plugin":"^4.0.1"},"devDependencies":{"@types/adm-zip":"^0.5.7","@types/decompress":"^4.2.7","@types/node":"^20.19.9","terminal-link":"^3.0.0"}}');
|
|
36716
36941
|
|
|
36717
36942
|
/***/ }
|
|
36718
36943
|
|