qcobjects-cli 2.5.143-beta → 2.5.144-beta
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/.cursor/rules/collaboration-features.mdc +25 -0
- package/.cursor/rules/development-guidelines.mdc +37 -0
- package/.cursor/rules/project-structure.mdc +36 -0
- package/.dockerignore +0 -0
- package/.github/FUNDING.yml +0 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- package/.github/ISSUE_TEMPLATE/custom.md +0 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- package/.github/ISSUE_TEMPLATE/issue-template.md +0 -0
- package/.github/workflows/ci.yml +26 -0
- package/.github/workflows/codeql-analysis.yml +0 -0
- package/.github/workflows/main-pr-source.yml +26 -0
- package/.github/workflows/npmpublish-beta.yml +20 -13
- package/.github/workflows/npmpublish-lts.yml +20 -13
- package/.github/workflows/npmpublish-main.yml +19 -12
- package/.github/workflows/open-pr-to-development.yml +70 -0
- package/.gitlab-ci.yml +0 -0
- package/.opencode/instructions/git-workflow.md +46 -0
- package/.pre-commit-config.yaml +9 -0
- package/AGENTS.md +59 -0
- package/CHANGELOG.md +0 -0
- package/README.md +75 -0
- package/VERSION +1 -1
- package/build-esbuild-esm.js +180 -0
- package/build-esbuild.js +182 -208
- package/deno.json +0 -0
- package/dev-requirements.txt +5 -0
- package/eslint.config.mjs +0 -0
- package/mod.ts +0 -0
- package/package.json +45 -44
- package/public/browser/api-client_services.js.map +1 -1
- package/public/browser/backend/backend-microservice-static.js +211 -219
- package/public/browser/backend/backend-microservice-static.js.map +2 -2
- package/public/browser/backend/backend-php.js +227 -231
- package/public/browser/backend/backend-php.js.map +3 -3
- package/public/browser/cli-commands-build-esbuild.js +326 -0
- package/public/browser/cli-commands-build-esbuild.js.map +7 -0
- package/public/browser/cli-commands-build-typescript.js +114 -0
- package/public/browser/cli-commands-build-typescript.js.map +7 -0
- package/public/browser/cli-commands-jira.js.map +1 -1
- package/public/browser/cli-commands-version.js.map +1 -1
- package/public/browser/cli-commands.js +4 -0
- package/public/browser/cli-commands.js.map +2 -2
- package/public/browser/cli-main.js.map +1 -1
- package/public/browser/client_services.js.map +1 -1
- package/public/browser/collab-server.js.map +1 -1
- package/public/browser/common-pipelog.js.map +1 -1
- package/public/browser/defaultsettings.js +68 -27
- package/public/browser/defaultsettings.js.map +3 -3
- package/public/browser/enterprise-commands.js.map +1 -1
- package/public/browser/main-file.js.map +1 -1
- package/public/browser/main-http-gae-server.js.map +1 -1
- package/public/browser/main-http-server.js.map +1 -1
- package/public/browser/main-http2-server.js.map +1 -1
- package/public/browser/qcobjects-cli.js.map +1 -1
- package/public/browser/qcobjects-collab.js +16 -24
- package/public/browser/qcobjects-collab.js.map +2 -2
- package/public/browser/qcobjects-createcert.js +46 -54
- package/public/browser/qcobjects-createcert.js.map +2 -2
- package/public/browser/qcobjects-gae-http-server.js +16 -24
- package/public/browser/qcobjects-gae-http-server.js.map +2 -2
- package/public/browser/qcobjects-http-server.js +16 -24
- package/public/browser/qcobjects-http-server.js.map +2 -2
- package/public/browser/qcobjects-http2-server.js +21 -30
- package/public/browser/qcobjects-http2-server.js.map +2 -2
- package/public/browser/qcobjects-shell.js.map +1 -1
- package/public/browser/templates/apps/spa-local.html +0 -0
- package/public/browser/templates/apps/spa-local.js +0 -0
- package/public/browser/templates/pwa/sw.js +0 -0
- package/public/browser/types/global/index.d.js +0 -9
- package/public/browser/types/global/index.d.js.map +3 -3
- package/public/cjs/api-client_services.js +74 -0
- package/public/cjs/api-client_services.js.map +1 -0
- package/public/cjs/backend/backend-microservice-static.js +255 -0
- package/public/cjs/backend/backend-microservice-static.js.map +1 -0
- package/public/cjs/backend/backend-php.js +317 -0
- package/public/cjs/backend/backend-php.js.map +1 -0
- package/public/cjs/cli-commands-build-esbuild.js +341 -0
- package/public/cjs/cli-commands-build-esbuild.js.map +1 -0
- package/public/cjs/cli-commands-build-typescript.js +127 -0
- package/public/cjs/cli-commands-build-typescript.js.map +1 -0
- package/public/cjs/cli-commands-jira.js +115 -0
- package/public/cjs/cli-commands-jira.js.map +1 -0
- package/public/cjs/cli-commands-publish-static.js +108 -0
- package/public/cjs/cli-commands-publish-static.js.map +1 -0
- package/public/cjs/cli-commands-version.js +250 -0
- package/public/cjs/cli-commands-version.js.map +1 -0
- package/public/cjs/cli-commands.js +73 -0
- package/public/cjs/cli-commands.js.map +1 -0
- package/public/cjs/cli-main.js +487 -0
- package/public/cjs/cli-main.js.map +1 -0
- package/public/cjs/client_services.js +80 -0
- package/public/cjs/client_services.js.map +1 -0
- package/public/cjs/collab-server.js +404 -0
- package/public/cjs/collab-server.js.map +1 -0
- package/public/cjs/common-pipelog.js +57 -0
- package/public/cjs/common-pipelog.js.map +1 -0
- package/public/cjs/defaultsettings.js +496 -0
- package/public/cjs/defaultsettings.js.map +1 -0
- package/public/cjs/enterprise-commands.js +173 -0
- package/public/cjs/enterprise-commands.js.map +1 -0
- package/public/cjs/index.js +38 -0
- package/public/cjs/index.js.map +1 -0
- package/public/cjs/main-file.js +161 -0
- package/public/cjs/main-file.js.map +1 -0
- package/public/cjs/main-http-gae-server.js +498 -0
- package/public/cjs/main-http-gae-server.js.map +1 -0
- package/public/cjs/main-http-server.js +540 -0
- package/public/cjs/main-http-server.js.map +1 -0
- package/public/cjs/main-http2-server.js +398 -0
- package/public/cjs/main-http2-server.js.map +1 -0
- package/public/cjs/qcobjects-cli.js +105 -0
- package/public/cjs/qcobjects-cli.js.map +1 -0
- package/public/cjs/qcobjects-collab.js +51 -0
- package/public/cjs/qcobjects-collab.js.map +1 -0
- package/public/cjs/qcobjects-createcert.js +89 -0
- package/public/cjs/qcobjects-createcert.js.map +1 -0
- package/public/cjs/qcobjects-gae-http-server.js +51 -0
- package/public/cjs/qcobjects-gae-http-server.js.map +1 -0
- package/public/cjs/qcobjects-http-server.js +51 -0
- package/public/cjs/qcobjects-http-server.js.map +1 -0
- package/public/cjs/qcobjects-http2-server.js +54 -0
- package/public/cjs/qcobjects-http2-server.js.map +1 -0
- package/public/cjs/qcobjects-shell.js +145 -0
- package/public/cjs/qcobjects-shell.js.map +1 -0
- package/public/cjs/templates/apps/spa-local.html +0 -0
- package/public/cjs/templates/apps/spa-local.js +0 -0
- package/public/cjs/templates/pwa/sw.js +0 -0
- package/public/esm/api-client_services.mjs.map +1 -1
- package/public/esm/backend/backend-microservice-static.mjs +207 -216
- package/public/esm/backend/backend-microservice-static.mjs.map +2 -2
- package/public/esm/backend/backend-php.mjs +228 -232
- package/public/esm/backend/backend-php.mjs.map +2 -2
- package/public/esm/cli-commands-build-esbuild.mjs +295 -0
- package/public/esm/cli-commands-build-esbuild.mjs.map +7 -0
- package/public/esm/cli-commands-build-typescript.mjs +83 -0
- package/public/esm/cli-commands-build-typescript.mjs.map +7 -0
- package/public/esm/cli-commands-jira.mjs +1 -1
- package/public/esm/cli-commands-jira.mjs.map +1 -1
- package/public/esm/cli-commands-version.mjs.map +1 -1
- package/public/esm/cli-commands.mjs +7 -3
- package/public/esm/cli-commands.mjs.map +2 -2
- package/public/esm/cli-main.mjs +6 -6
- package/public/esm/cli-main.mjs.map +1 -1
- package/public/esm/client_services.mjs.map +1 -1
- package/public/esm/collab-server.mjs.map +1 -1
- package/public/esm/common-pipelog.mjs.map +1 -1
- package/public/esm/defaultsettings.mjs +68 -27
- package/public/esm/defaultsettings.mjs.map +3 -3
- package/public/esm/enterprise-commands.mjs.map +1 -1
- package/public/esm/index.mjs +1 -1
- package/public/esm/main-file.mjs.map +1 -1
- package/public/esm/main-http-gae-server.mjs +2 -2
- package/public/esm/main-http-gae-server.mjs.map +1 -1
- package/public/esm/main-http-server.mjs +2 -2
- package/public/esm/main-http-server.mjs.map +1 -1
- package/public/esm/main-http2-server.mjs +2 -2
- package/public/esm/main-http2-server.mjs.map +1 -1
- package/public/esm/qcobjects-cli.mjs +2 -2
- package/public/esm/qcobjects-cli.mjs.map +1 -1
- package/public/esm/qcobjects-collab.mjs +14 -23
- package/public/esm/qcobjects-collab.mjs.map +2 -2
- package/public/esm/qcobjects-createcert.mjs +43 -52
- package/public/esm/qcobjects-createcert.mjs.map +2 -2
- package/public/esm/qcobjects-gae-http-server.mjs +14 -23
- package/public/esm/qcobjects-gae-http-server.mjs.map +2 -2
- package/public/esm/qcobjects-http-server.mjs +14 -23
- package/public/esm/qcobjects-http-server.mjs.map +2 -2
- package/public/esm/qcobjects-http2-server.mjs +21 -31
- package/public/esm/qcobjects-http2-server.mjs.map +2 -2
- package/public/esm/qcobjects-shell.mjs +1 -1
- package/public/esm/qcobjects-shell.mjs.map +1 -1
- package/public/esm/templates/apps/spa-local.html +0 -0
- package/public/esm/templates/apps/spa-local.js +0 -0
- package/public/esm/templates/pwa/sw.js +0 -0
- package/public/esm/types/global/index.d.mjs +0 -9
- package/public/esm/types/global/index.d.mjs.map +3 -3
- package/public/types/index.d.ts +29 -3
- package/spec/support/jasmine.json +0 -0
- package/spec/testsSpec.ts +0 -0
- package/src/api-client_services.ts +1 -1
- package/src/backend/backend-microservice-static.ts +196 -196
- package/src/backend/backend-php.ts +240 -245
- package/src/cli-commands-build-esbuild.ts +375 -0
- package/src/cli-commands-build-typescript.ts +139 -0
- package/src/cli-commands-jira.ts +1 -1
- package/src/cli-commands-publish-static.ts +0 -0
- package/src/cli-commands-version.ts +1 -1
- package/src/cli-commands.ts +3 -1
- package/src/cli-main.ts +1 -1
- package/src/client_services.ts +1 -1
- package/src/collab-server.ts +1 -1
- package/src/common-pipelog.ts +1 -1
- package/src/defaultsettings.ts +65 -19
- package/src/enterprise-commands.ts +1 -1
- package/src/index.ts +0 -0
- package/src/main-file.ts +1 -1
- package/src/main-http-gae-server.ts +1 -1
- package/src/main-http-server.ts +1 -1
- package/src/main-http2-server.ts +1 -1
- package/src/qcobjects-cli.ts +1 -1
- package/src/qcobjects-collab.ts +1 -1
- package/src/qcobjects-createcert.ts +1 -1
- package/src/qcobjects-gae-http-server.ts +1 -1
- package/src/qcobjects-http-server.ts +1 -1
- package/src/qcobjects-http2-server.ts +4 -5
- package/src/qcobjects-shell.ts +1 -1
- package/src/templates/apps/spa-local.html +0 -0
- package/src/templates/apps/spa-local.js +0 -0
- package/src/templates/pwa/sw.js +0 -0
- package/src/types/global/index.d.ts +0 -0
- package/transpile.js +0 -0
- package/tsconfig.d.json +0 -0
- package/tsconfig.jasmine.json +0 -0
- package/tsconfig.json +3 -3
- package/public/cjs/api-client_services.cjs +0 -79
- package/public/cjs/api-client_services.cjs.map +0 -7
- package/public/cjs/backend/backend-microservice-static.cjs +0 -245
- package/public/cjs/backend/backend-microservice-static.cjs.map +0 -7
- package/public/cjs/backend/backend-php.cjs +0 -301
- package/public/cjs/backend/backend-php.cjs.map +0 -7
- package/public/cjs/cli-commands-jira.cjs +0 -112
- package/public/cjs/cli-commands-jira.cjs.map +0 -7
- package/public/cjs/cli-commands-publish-static.cjs +0 -109
- package/public/cjs/cli-commands-publish-static.cjs.map +0 -7
- package/public/cjs/cli-commands-version.cjs +0 -252
- package/public/cjs/cli-commands-version.cjs.map +0 -7
- package/public/cjs/cli-commands.cjs +0 -45
- package/public/cjs/cli-commands.cjs.map +0 -7
- package/public/cjs/cli-main.cjs +0 -417
- package/public/cjs/cli-main.cjs.map +0 -7
- package/public/cjs/client_services.cjs +0 -86
- package/public/cjs/client_services.cjs.map +0 -7
- package/public/cjs/collab-server.cjs +0 -444
- package/public/cjs/collab-server.cjs.map +0 -7
- package/public/cjs/common-pipelog.cjs +0 -50
- package/public/cjs/common-pipelog.cjs.map +0 -7
- package/public/cjs/defaultsettings.cjs +0 -432
- package/public/cjs/defaultsettings.cjs.map +0 -7
- package/public/cjs/enterprise-commands.cjs +0 -175
- package/public/cjs/enterprise-commands.cjs.map +0 -7
- package/public/cjs/index.cjs +0 -36
- package/public/cjs/index.cjs.map +0 -7
- package/public/cjs/main-file.cjs +0 -194
- package/public/cjs/main-file.cjs.map +0 -7
- package/public/cjs/main-http-gae-server.cjs +0 -522
- package/public/cjs/main-http-gae-server.cjs.map +0 -7
- package/public/cjs/main-http-server.cjs +0 -588
- package/public/cjs/main-http-server.cjs.map +0 -7
- package/public/cjs/main-http2-server.cjs +0 -431
- package/public/cjs/main-http2-server.cjs.map +0 -7
- package/public/cjs/qcobjects-cli.cjs +0 -92
- package/public/cjs/qcobjects-cli.cjs.map +0 -7
- package/public/cjs/qcobjects-collab.cjs +0 -43
- package/public/cjs/qcobjects-collab.cjs.map +0 -7
- package/public/cjs/qcobjects-createcert.cjs +0 -75
- package/public/cjs/qcobjects-createcert.cjs.map +0 -7
- package/public/cjs/qcobjects-gae-http-server.cjs +0 -43
- package/public/cjs/qcobjects-gae-http-server.cjs.map +0 -7
- package/public/cjs/qcobjects-http-server.cjs +0 -43
- package/public/cjs/qcobjects-http-server.cjs.map +0 -7
- package/public/cjs/qcobjects-http2-server.cjs +0 -49
- package/public/cjs/qcobjects-http2-server.cjs.map +0 -7
- package/public/cjs/qcobjects-shell.cjs +0 -185
- package/public/cjs/qcobjects-shell.cjs.map +0 -7
- package/public/cjs/types/global/index.d.cjs +0 -2
- package/public/cjs/types/global/index.d.cjs.map +0 -7
- package/public/types/index.d.ts.map +0 -1
- package/src/index.cts +0 -2
- package/src/index.mts +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/qcobjects-shell.ts"],
|
|
4
|
-
"sourcesContent": ["#!/usr/bin/env node\n/**\n * QCObjects CLI 2.
|
|
4
|
+
"sourcesContent": ["#!/usr/bin/env node\n/**\n * QCObjects CLI 2.5\n * ________________\n *\n * Author: Jean Machuca <correojean@gmail.com>\n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,<correojean@gmail.com>\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n/*eslint no-unused-vars: \"off\"*/\n/*eslint no-redeclare: \"off\"*/\n/*eslint no-empty: \"off\"*/\n/*eslint strict: \"off\"*/\n/*eslint no-mixed-operators: \"off\"*/\n/*eslint no-undef: \"off\"*/\n\"use strict\";\n\nconst welcometo = \"Welcome to \\n\";\nconst instructions = \"Type:\\n .exit to quit\\n .help for see a quick guide\\n And any other command to execute like pure javascript \\n All the QCObjects stuff is already loaded for you\";\n//const logo = ' .88888. a88888b. .88888. dP oo dP \\r\\nd8\\' `8b d8\\' `88 d8\\' `8b 88 88 \\r\\n88 88 88 88 88 88d888b. dP .d8888b. .d8888b. d8888P .d8888b. \\r\\n88 db 88 88 88 88 88\\' `88 88 88ooood8 88\\' `\\\"\\\" 88 Y8ooooo. \\r\\nY8. Y88P Y8. .88 Y8. .8P 88. .88 88 88. ... 88. ... 88 88 \\r\\n `8888PY8b Y88888P\\' `8888P\\' 88Y8888\\' 88 `88888P\\' `88888P\\' dP `88888P\\' \\r\\noooooooooooooooooooooooooooooooooooooooo88~oooooooooooooooooooooooooooooooooo\\r\\n dP ';\nconst logo = \" .d88888b. .d8888b. .d88888b. 888 d8b 888 \\r\\nd88P\\\" \\\"Y88bd88P Y88bd88P\\\" \\\"Y88b888 Y8P 888 \\r\\n888 888888 888888 888888 888 \\r\\n888 888888 888 88888888b. 8888 .d88b. .d8888b888888.d8888b \\r\\n888 888888 888 888888 \\\"88b \\\"888d8P Y8bd88P\\\" 888 88K \\r\\n888 Y8b 888888 888888 888888 888 88888888888888 888 \\\"Y8888b. \\r\\nY88b.Y8b88PY88b d88PY88b. .d88P888 d88P 888Y8b. Y88b. Y88b. X88 \\r\\n \\\"Y888888\\\" \\\"Y8888P\\\" \\\"Y88888P\\\" 88888P\\\" 888 \\\"Y8888 \\\"Y8888P \\\"Y888 88888P' \\r\\n Y8b 888 \\r\\n d88P \\r\\n 888P\\\" \";\nimport path from \"path\";\nconst absolutePath = path.resolve( __dirname, \"./\" );\n\nimport vm from \"vm\";\n\nimport {InheritClass, global} from \"qcobjects\";\nimport \"./defaultsettings\";\nimport readline from \"readline\";\n\n\nclass Main extends InheritClass {\n constructor(){\n super();\n this.start();\n }\n\n start (){\n const sandbox = {\n require:require,\n module:module,\n __dirname:\"./\",\n __filename:\"qcobjects-shell-file.js\"\n };\n global.context = vm.createContext(sandbox);\n \n const runScript = (code: string,logOutput=false)=>{\n const options = {filename:sandbox.__filename};\n \n const backgroundRunScript = (code: string):any=>{\n var output = vm.runInContext(code,global.context,options);\n return output;\n };\n \n var output = backgroundRunScript(code);\n \n if (logOutput && typeof output !== \"undefined\"){\n console.log(output);\n }\n };\n \n const syncGlobal = ()=>{\n var s = \"Object.assign(this,this.constructor.constructor('return this')())\";\n runScript(s);\n };\n \n readline.emitKeypressEvents(process.stdin);\n if (process.stdin.isTTY)\n process.stdin.setRawMode(true);\n \n const qcobjects_version = global.__get_version_string__();\n \n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n prompt: qcobjects_version + \" >\"\n });\n \n const protected_symbols = [ \"clearInterval\",\n \"clearTimeout\",\n \"setInterval\",\n \"setTimeout\", \"queueMicrotask\",\n \"clearImmediate\", \"setImmediate\", \"_asyncLoad\",\n \"_fireAsyncLoad\", \"asyncLoad\", \"logger\",\n \"_Crypt\", \"CONFIG\", \"waitUntil\",\n \"_super_\", \"ComplexStorageCache\", \"TagElements\",\n \"onload\", \"InheritClass\", \"Component\",\n \"Controller\", \"View\", \"Service\",\n \"JSONService\", \"ConfigService\", \"VO\",\n \"serviceLoader\", \"componentLoader\", \"ComponentURI\",\n \"SourceJS\", \"SourceCSS\", \"ArrayList\",\n \"ArrayCollection\", \"Effect\", \"Timer\",\n \"Export\", \"Import\", \"Package\",\n \"Class\", \"New\", \"Tag\",\n \"Ready\", \"Contact\", \"FormField\",\n \"ButtonField\", \"InputField\", \"TextField\",\n \"EmailField\", \"GridComponent\", \"GridController\",\n \"GridView\", \"Move\", \"RotateX\",\n \"RotateY\", \"RotateZ\", \"Rotate\",\n \"Fade\", \"Radius\", \"CanvasTool\",\n \"BasicLayout\"\n ];\n \n const preloaded_scripts = [\n \"require('qcobjects')\",\n \"Object.assign(this,this.constructor.constructor('return this')())\"\n ];\n \n preloaded_scripts.map(preloaded_script =>\n runScript(preloaded_script.trim())\n );\n \n \n console.log(welcometo);\n console.log(logo);\n console.log(instructions);\n rl.prompt(true);\n \n rl.on(\"line\", (line) => {\n var codeline = line.trim();\n switch (true) {\n case codeline==\"hello\":\n console.log(\"world!\");\n break;\n case codeline==\".exit\":\n rl.close();\n break;\n default:\n try{\n runScript(codeline,true);\n syncGlobal.bind(sandbox)();\n }catch (e){\n console.log(\"An exeption ocurred while trying to run your awesome code! \");\n console.log(e);\n }\n break;\n }\n rl.prompt();\n }).on(\"close\", () => {\n console.log(\"Thank you for using QCObjects.\");\n console.log(\"Have a nice day!\");\n process.exit(0);\n });\n \n }\n}"],
|
|
5
5
|
"mappings": "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",
|
|
6
6
|
"names": ["code", "output"]
|
|
7
7
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
3
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
4
|
-
};
|
|
5
|
-
var require_index_d = __commonJS({
|
|
6
|
-
"src/types/global/index.d.ts"() {
|
|
7
|
-
}
|
|
8
|
-
});
|
|
9
|
-
export default require_index_d();
|
|
10
1
|
//# sourceMappingURL=index.d.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": [],
|
|
4
|
+
"sourcesContent": [],
|
|
5
|
+
"mappings": "",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/public/types/index.d.ts
CHANGED
|
@@ -25,6 +25,30 @@ declare module "api-client_services" {
|
|
|
25
25
|
fail(e: any): void;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
declare module "cli-commands-build-esbuild" {
|
|
29
|
+
import { InheritClass } from "qcobjects";
|
|
30
|
+
export class CommandHandler extends InheritClass {
|
|
31
|
+
choiceOption: {
|
|
32
|
+
[x: string]: any;
|
|
33
|
+
build_esbuild: () => Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
constructor({ switchCommander }: {
|
|
36
|
+
switchCommander: any;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
declare module "cli-commands-build-typescript" {
|
|
41
|
+
import { InheritClass } from "qcobjects";
|
|
42
|
+
export class CommandHandler extends InheritClass {
|
|
43
|
+
choiceOption: {
|
|
44
|
+
[x: string]: any;
|
|
45
|
+
build_typescript: (configFile: string) => void;
|
|
46
|
+
};
|
|
47
|
+
constructor({ switchCommander }: {
|
|
48
|
+
switchCommander: any;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
28
52
|
declare module "client_services" {
|
|
29
53
|
import { Service } from "qcobjects";
|
|
30
54
|
export class JiraCloud extends Service {
|
|
@@ -92,6 +116,8 @@ declare module "cli-commands" {
|
|
|
92
116
|
export * as versionCommand from "cli-commands-version";
|
|
93
117
|
export * as jiraCommand from "cli-commands-jira";
|
|
94
118
|
export * as publishStatic from "cli-commands-publish-static";
|
|
119
|
+
export * as buildTypescript from "cli-commands-build-typescript";
|
|
120
|
+
export * as buildEsbuild from "cli-commands-build-esbuild";
|
|
95
121
|
}
|
|
96
122
|
declare module "defaultsettings" {
|
|
97
123
|
import "qcobjects";
|
|
@@ -101,6 +127,7 @@ declare module "defaultsettings" {
|
|
|
101
127
|
cli: any;
|
|
102
128
|
};
|
|
103
129
|
export const __get_version_string__: () => string;
|
|
130
|
+
export const getProjectPath: () => any;
|
|
104
131
|
}
|
|
105
132
|
declare module "cli-main" {
|
|
106
133
|
import "qcobjects";
|
|
@@ -178,7 +205,7 @@ declare module "cli-commands-version" {
|
|
|
178
205
|
}
|
|
179
206
|
declare module "collab-server" {
|
|
180
207
|
/**
|
|
181
|
-
* QCObjects CLI 2.
|
|
208
|
+
* QCObjects CLI 2.5
|
|
182
209
|
* ________________
|
|
183
210
|
*
|
|
184
211
|
* Author: Jean Machuca <correojean@gmail.com>
|
|
@@ -348,7 +375,7 @@ declare module "qcobjects-http-server" {
|
|
|
348
375
|
}
|
|
349
376
|
declare module "qcobjects-http2-server" {
|
|
350
377
|
/**
|
|
351
|
-
* QCObjects CLI 2.
|
|
378
|
+
* QCObjects CLI 2.5
|
|
352
379
|
* ________________
|
|
353
380
|
*
|
|
354
381
|
* Author: Jean Machuca <correojean@gmail.com>
|
|
@@ -378,4 +405,3 @@ declare module "qcobjects-shell" {
|
|
|
378
405
|
}
|
|
379
406
|
declare module "backend/backend-microservice-static" { }
|
|
380
407
|
declare module "backend/backend-php" { }
|
|
381
|
-
//# sourceMappingURL=index.d.ts.map
|
|
File without changes
|
package/spec/testsSpec.ts
CHANGED
|
File without changes
|
|
@@ -35,248 +35,248 @@ import fs from "node:fs";
|
|
|
35
35
|
import path from "node:path";
|
|
36
36
|
import { Package, BackendMicroservice, CONFIG, logger } from "qcobjects";
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
const absolutePath = path.resolve(__dirname, "./");
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
Package("com.qcobjects.backend.microservice.static", [
|
|
42
|
+
class Microservice extends BackendMicroservice {
|
|
43
|
+
stream: any;
|
|
44
|
+
fileName: any;
|
|
45
|
+
route: any;
|
|
46
|
+
request: any;
|
|
47
|
+
body!: void;
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
finishWithBody() { }
|
|
50
|
+
done() {
|
|
51
|
+
// read and send file content in the stream
|
|
52
|
+
|
|
53
|
+
const microservice = this;
|
|
54
|
+
const stream = microservice.stream;
|
|
55
|
+
const fileName = (!microservice.fileName.startsWith("/")) ? (`${process.cwd()}/${microservice.fileName}`) : (microservice.fileName);
|
|
56
|
+
|
|
57
|
+
const sendFileHTTP2 = function (stream: { respondWithFD: (arg0: any, arg1: { "content-length": any; "last-modified": any; "content-type": any; "cache-control": any; }) => void; on: (arg0: string, arg1: { (): void; (): void; }) => void; end: () => void; respond: (arg0: { ":status": number; "content-type": any; }) => void; write: (arg0: string) => void; }, fileName: string) {
|
|
51
58
|
// read and send file content in the stream
|
|
52
59
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"last-modified": stat.mtime.toUTCString(),
|
|
66
|
-
"content-type": mime.getType(fileName),
|
|
67
|
-
"cache-control": CONFIG.get("cacheControl", "max-age=31536000")
|
|
68
|
-
};
|
|
69
|
-
if (typeof microservice.route.responseHeaders !== "undefined") {
|
|
70
|
-
headers = Object.assign(headers, microservice.route.responseHeaders);
|
|
71
|
-
}
|
|
60
|
+
try {
|
|
61
|
+
const fd = fs.openSync(fileName, "r");
|
|
62
|
+
const stat = fs.fstatSync(fd);
|
|
63
|
+
let headers = {
|
|
64
|
+
"content-length": stat.size,
|
|
65
|
+
"last-modified": stat.mtime.toUTCString(),
|
|
66
|
+
"content-type": mime.getType(fileName),
|
|
67
|
+
"cache-control": CONFIG.get("cacheControl", "max-age=31536000")
|
|
68
|
+
};
|
|
69
|
+
if (typeof microservice.route.responseHeaders !== "undefined") {
|
|
70
|
+
headers = Object.assign(headers, microservice.route.responseHeaders);
|
|
71
|
+
}
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
stream.respondWithFD(fd, headers);
|
|
74
|
+
stream.on("close", () => {
|
|
75
|
+
logger.debug("closing file " + fileName);
|
|
76
|
+
fs.closeSync(fd);
|
|
77
|
+
});
|
|
78
|
+
stream.end();
|
|
79
|
+
|
|
80
|
+
} catch (e: any) {
|
|
81
|
+
logger.warn("[ERROR] Something went wrong when trying to send the response as file " + fileName);
|
|
82
|
+
if (e.errno == -2) {
|
|
83
|
+
const headers = {
|
|
84
|
+
":status": 404,
|
|
85
|
+
"content-type": mime.getType(fileName)
|
|
86
|
+
};
|
|
87
|
+
stream.respond(headers);
|
|
88
|
+
stream.write("<h1>404 - FILE NOT FOUND</h1>");
|
|
74
89
|
stream.on("close", () => {
|
|
75
90
|
logger.debug("closing file " + fileName);
|
|
76
|
-
fs.closeSync(fd);
|
|
77
91
|
});
|
|
78
92
|
stream.end();
|
|
79
|
-
|
|
80
|
-
} catch (e: any) {
|
|
81
|
-
logger.warn("[ERROR] Something went wrong when trying to send the response as file " + fileName);
|
|
82
|
-
if (e.errno == -2) {
|
|
83
|
-
const headers = {
|
|
84
|
-
":status": 404,
|
|
85
|
-
"content-type": mime.getType(fileName)
|
|
86
|
-
};
|
|
87
|
-
stream.respond(headers);
|
|
88
|
-
stream.write("<h1>404 - FILE NOT FOUND</h1>");
|
|
89
|
-
stream.on("close", () => {
|
|
90
|
-
logger.debug("closing file " + fileName);
|
|
91
|
-
});
|
|
92
|
-
stream.end();
|
|
93
|
-
}
|
|
94
93
|
}
|
|
94
|
+
}
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
};
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
98
|
+
const sendFileLegacyHTTP = function (stream: { writeHead: (arg0: number, arg1: { status: number; "Content-Type": string; }) => void; write: (arg0: string) => void; on: (arg0: string, arg1: { (): void; (): void; }) => void; end: () => void; }, fileName: string) {
|
|
99
|
+
// read and send file content in the stream
|
|
100
|
+
let headers;
|
|
101
|
+
try {
|
|
102
|
+
logger.info("trying to read " + fileName);
|
|
103
|
+
const fd = fs.openSync(fileName, "r");
|
|
104
|
+
const stat = fs.fstatSync(fd);
|
|
105
|
+
headers = {
|
|
106
|
+
"Content-Length": stat.size,
|
|
107
|
+
"Last-Modified": stat.mtime.toUTCString(),
|
|
108
|
+
"Content-Type": mime.getType(fileName),
|
|
109
|
+
"Cache-Control": CONFIG.get("cacheControl", "max-age=31536000")
|
|
110
|
+
};
|
|
111
|
+
if (typeof microservice.route.responseHeaders !== "undefined") {
|
|
112
|
+
headers = Object.assign(headers, microservice.route.responseHeaders);
|
|
113
|
+
}
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
logger.debug("closing file " + fileName);
|
|
116
|
+
fs.closeSync(fd);
|
|
117
|
+
|
|
118
|
+
stream.writeHead(200, headers);
|
|
117
119
|
|
|
118
|
-
|
|
120
|
+
stream.write(fs.readFileSync(fileName).toString());
|
|
121
|
+
stream.on("close", () => {
|
|
122
|
+
logger.info("closing static file", fileName);
|
|
123
|
+
});
|
|
119
124
|
|
|
120
|
-
|
|
125
|
+
} catch (e: any) {
|
|
126
|
+
if (e.errno == -2) {
|
|
127
|
+
headers = {
|
|
128
|
+
"status": 404,
|
|
129
|
+
"Content-Type": "text/html"
|
|
130
|
+
};
|
|
131
|
+
stream.writeHead(404, headers);
|
|
132
|
+
stream.write("<h1>404 - FILE NOT FOUND</h1>");
|
|
121
133
|
stream.on("close", () => {
|
|
122
|
-
logger.info("closing static file", fileName);
|
|
134
|
+
logger.info("closing static file with error: ", fileName);
|
|
123
135
|
});
|
|
124
|
-
|
|
125
|
-
} catch (e: any) {
|
|
126
|
-
if (e.errno == -2) {
|
|
127
|
-
headers = {
|
|
128
|
-
"status": 404,
|
|
129
|
-
"Content-Type": "text/html"
|
|
130
|
-
};
|
|
131
|
-
stream.writeHead(404, headers);
|
|
132
|
-
stream.write("<h1>404 - FILE NOT FOUND</h1>");
|
|
133
|
-
stream.on("close", () => {
|
|
134
|
-
logger.info("closing static file with error: ", fileName);
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
logger.warn(e);
|
|
138
|
-
stream.end();
|
|
139
136
|
}
|
|
137
|
+
logger.warn(e);
|
|
140
138
|
stream.end();
|
|
141
|
-
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
if (typeof stream.respondWithFD !== "undefined") {
|
|
145
|
-
sendFileHTTP2(stream, fileName);
|
|
146
|
-
} else {
|
|
147
|
-
sendFileLegacyHTTP(stream, fileName);
|
|
148
139
|
}
|
|
140
|
+
stream.end();
|
|
141
|
+
|
|
142
|
+
};
|
|
149
143
|
|
|
144
|
+
if (typeof stream.respondWithFD !== "undefined") {
|
|
145
|
+
sendFileHTTP2(stream, fileName);
|
|
146
|
+
} else {
|
|
147
|
+
sendFileLegacyHTTP(stream, fileName);
|
|
150
148
|
}
|
|
151
149
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
} else {
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
static(method: string, data: any) {
|
|
153
|
+
const microservice = this;
|
|
154
|
+
const redirect_to = microservice.route.redirect_to;
|
|
155
|
+
return new Promise<void>(function (resolve, reject) {
|
|
156
|
+
const supported_methods = microservice.route.supported_methods;
|
|
157
|
+
let _method_allowed_ = false;
|
|
158
|
+
if (typeof supported_methods !== "undefined") {
|
|
159
|
+
if (supported_methods == "*" || (typeof method === "undefined") || [...supported_methods].map(m => m.toLowerCase()).indexOf(method.toLowerCase()) !== -1) {
|
|
163
160
|
_method_allowed_ = true;
|
|
164
161
|
}
|
|
162
|
+
} else {
|
|
163
|
+
_method_allowed_ = true;
|
|
164
|
+
}
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
} else {
|
|
180
|
-
logger.info("There is no redirect_to setting declared in route properties. \n Skipping static delivery...");
|
|
181
|
-
reject(new Error("There is no redirect_to setting declared in route properties. \n Skipping static delivery..."));
|
|
166
|
+
logger.debug("Starting static delivery microservice call for method: " + method);
|
|
167
|
+
if (_method_allowed_) {
|
|
168
|
+
logger.info("I'm going to deliver a static path...");
|
|
169
|
+
if (redirect_to) {
|
|
170
|
+
const request_path = microservice.request.path;
|
|
171
|
+
const re = (new RegExp(microservice.route.path.replace(/{(.*?)}/g, "\(\?\<$1\>\.\*\)"), "g"));
|
|
172
|
+
microservice.fileName = request_path.replace(re, microservice.route.redirect_to);
|
|
173
|
+
try {
|
|
174
|
+
resolve();
|
|
175
|
+
} catch (e) {
|
|
176
|
+
logger.warn("\u{1F926} Something went wrong \u{1F926} when trying to deliver a static path: " + microservice.fileName);
|
|
177
|
+
reject(e instanceof Error ? e : new Error(String(e)));
|
|
182
178
|
}
|
|
183
179
|
} else {
|
|
184
|
-
logger.
|
|
185
|
-
|
|
180
|
+
logger.info("There is no redirect_to setting declared in route properties. \n Skipping static delivery...");
|
|
181
|
+
reject(new Error("There is no redirect_to setting declared in route properties. \n Skipping static delivery..."));
|
|
186
182
|
}
|
|
183
|
+
} else {
|
|
184
|
+
logger.debug("Method: " + method + " will be skipped");
|
|
185
|
+
resolve();
|
|
186
|
+
}
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
190
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
191
|
+
head(formData: any) {
|
|
192
|
+
const microservice = this;
|
|
193
|
+
microservice.static("head", formData).then(response => {
|
|
194
|
+
microservice.body = response;
|
|
195
|
+
microservice.done();
|
|
196
|
+
})
|
|
197
|
+
.catch((e: any) => { logger.warn(`An error ocurred: ${e}`); });
|
|
198
|
+
}
|
|
199
199
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
200
|
+
get(formData: any) {
|
|
201
|
+
const microservice = this;
|
|
202
|
+
microservice.static("get", formData).then(response => {
|
|
203
|
+
microservice.body = response;
|
|
204
|
+
microservice.done();
|
|
205
|
+
}).catch(error => {
|
|
206
|
+
console.error(error);
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
209
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
210
|
+
post(formData: any) {
|
|
211
|
+
const microservice = this;
|
|
212
|
+
microservice.static("post", formData).then(response => {
|
|
213
|
+
microservice.body = response;
|
|
214
|
+
microservice.done();
|
|
215
|
+
})
|
|
216
|
+
.catch((e: any) => { logger.warn(`An error ocurred: ${e}`); });
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
}
|
|
219
219
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
220
|
+
put(formData: any) {
|
|
221
|
+
const microservice = this;
|
|
222
|
+
microservice.static("put", formData).then(response => {
|
|
223
|
+
microservice.body = response;
|
|
224
|
+
microservice.done();
|
|
225
|
+
})
|
|
226
|
+
.catch((e: any) => { logger.warn(`An error ocurred: ${e}`); });
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
}
|
|
229
229
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
230
|
+
delete(formData: any) {
|
|
231
|
+
const microservice = this;
|
|
232
|
+
microservice.static("delete", formData).then(response => {
|
|
233
|
+
microservice.body = response;
|
|
234
|
+
microservice.done();
|
|
235
|
+
})
|
|
236
|
+
.catch((e: any) => { logger.warn(`An error ocurred: ${e}`); });
|
|
237
237
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
connect(formData: any) {
|
|
241
|
-
const microservice = this;
|
|
242
|
-
microservice.static("connect", formData).then(response => {
|
|
243
|
-
microservice.body = response;
|
|
244
|
-
microservice.done();
|
|
245
|
-
})
|
|
246
|
-
.catch((e: any) => { logger.warn(`An error ocurred: ${e}`); });
|
|
238
|
+
}
|
|
247
239
|
|
|
248
|
-
|
|
240
|
+
connect(formData: any) {
|
|
241
|
+
const microservice = this;
|
|
242
|
+
microservice.static("connect", formData).then(response => {
|
|
243
|
+
microservice.body = response;
|
|
244
|
+
microservice.done();
|
|
245
|
+
})
|
|
246
|
+
.catch((e: any) => { logger.warn(`An error ocurred: ${e}`); });
|
|
249
247
|
|
|
250
|
-
|
|
251
|
-
const microservice = this;
|
|
252
|
-
microservice.static("options", formData).then(response => {
|
|
253
|
-
microservice.body = response;
|
|
254
|
-
microservice.done();
|
|
255
|
-
})
|
|
256
|
-
.catch((e: any) => { logger.warn(`An error ocurred: ${e}`); });
|
|
248
|
+
}
|
|
257
249
|
|
|
258
|
-
|
|
250
|
+
options(formData: any) {
|
|
251
|
+
const microservice = this;
|
|
252
|
+
microservice.static("options", formData).then(response => {
|
|
253
|
+
microservice.body = response;
|
|
254
|
+
microservice.done();
|
|
255
|
+
})
|
|
256
|
+
.catch((e: any) => { logger.warn(`An error ocurred: ${e}`); });
|
|
259
257
|
|
|
260
|
-
|
|
261
|
-
const microservice = this;
|
|
262
|
-
microservice.static("trace", formData).then(response => {
|
|
263
|
-
microservice.body = response;
|
|
264
|
-
microservice.done();
|
|
265
|
-
})
|
|
266
|
-
.catch((e: any) => { logger.warn(`An error ocurred: ${e}`); });
|
|
258
|
+
}
|
|
267
259
|
|
|
268
|
-
|
|
260
|
+
trace(formData: any) {
|
|
261
|
+
const microservice = this;
|
|
262
|
+
microservice.static("trace", formData).then(response => {
|
|
263
|
+
microservice.body = response;
|
|
264
|
+
microservice.done();
|
|
265
|
+
})
|
|
266
|
+
.catch((e: any) => { logger.warn(`An error ocurred: ${e}`); });
|
|
269
267
|
|
|
270
|
-
|
|
271
|
-
const microservice = this;
|
|
272
|
-
microservice.static("patch", formData).then(response => {
|
|
273
|
-
microservice.body = response;
|
|
274
|
-
microservice.done();
|
|
275
|
-
})
|
|
276
|
-
.catch((e: any) => { logger.warn(`An error ocurred: ${e}`); });
|
|
268
|
+
}
|
|
277
269
|
|
|
278
|
-
|
|
270
|
+
patch(formData: any) {
|
|
271
|
+
const microservice = this;
|
|
272
|
+
microservice.static("patch", formData).then(response => {
|
|
273
|
+
microservice.body = response;
|
|
274
|
+
microservice.done();
|
|
275
|
+
})
|
|
276
|
+
.catch((e: any) => { logger.warn(`An error ocurred: ${e}`); });
|
|
279
277
|
|
|
280
278
|
}
|
|
281
279
|
|
|
282
|
-
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
]);
|