diff --git a/.github/workflows/publish_package_to_npmjs.yaml b/.github/workflows/publish_package_to_npmjs.yaml new file mode 100644 index 0000000..a21be6c --- /dev/null +++ b/.github/workflows/publish_package_to_npmjs.yaml @@ -0,0 +1,49 @@ +name: Publish Metascript to npmjs + +on: + workflow_dispatch: + inputs: + publish_env: + description: Select the environment to publish to (production or alpha) + type: choice + required: true + options: + - production + - alpha + +jobs: + publish_metascript: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + + steps: + # Step 1: Checkout repository + - name: Checkout repository + uses: actions/checkout@v4 + + # Step 2: Setup Node.js environment + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20.x" + registry-url: "https://registry.npmjs.org" + + # Step 3: Install dependencies + - name: Install dependencies + run: npm ci + + # Step 4: Publish Metascript Package + - name: Publish Metascript + run: | + if [ "${{ inputs.publish_env }}" == "alpha" ]; then + PUBLISH_TAG="--tag alpha" + else + PUBLISH_TAG="" + fi + + echo "Publishing metascript to ${{ inputs.publish_env }} environment" + npm publish $PUBLISH_TAG + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/README.md b/README.md index 1e3d604..c7f6098 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +# MetaScript Fork + +This is a **fork of MetaScript**, originally created by [dcodeIO](https://github.com/dcodeIO). +This fork includes **updated dependencies** and ongoing **maintenance improvements** to ensure compatibility with modern environments. + +Feel free to contribute, report issues, or suggest improvements! 🚀 + ![MetaScript](https://raw.github.com/dcodeIO/MetaScript/master/MetaScript.png) ============================================================================== diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..ede8f32 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,263 @@ +{ + "name": "@uniformdev/metascript", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@uniformdev/metascript", + "version": "1.0.0", + "license": "Apache-2.0", + "dependencies": { + "ascli": "~0.3", + "glob": "^5" + }, + "bin": { + "metac": "bin/metac", + "metascript": "bin/metascript" + }, + "devDependencies": { + "jsdoc": "~3.3" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/ascli": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ascli/-/ascli-0.3.0.tgz", + "integrity": "sha512-6JOAjpM6FuU/qdhg8xRnEjoVy8cnk3PygbrbJfSdbiRE+dUkl5h7nTvMoKMYI3qiMwM7amHSmsVOcdN/TFtdDQ==", + "dependencies": { + "colour": "latest", + "optjs": "latest" + } + }, + "node_modules/async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/catharsis": { + "version": "0.8.11", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz", + "integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/colour": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", + "integrity": "sha512-Rel466v0EnmKPcsxHo91L4kgPs/6XF7Pu2LJNszq9lXYwi5CFWEeIiRaTX5ym7PPMdj4udDHkLSVC1//JVkZQg==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/esprima": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz", + "integrity": "sha512-S9VbPDU0adFErpDai3qDkjq8+G05ONtKzcyNrPKg/ZKa+tf879nX2KexNU95b31UoTJjRLInNBHHHjFPoCd7lQ==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/js2xmlparser": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-0.1.9.tgz", + "integrity": "sha512-hODrVKiD7fo3axq8fXwFMRkCFwYicELpxfUYyA6tYptiBNY++KyQ/39qAl1es2AwBtFys4YBt7W5/5F3taT9pA==", + "dev": true + }, + "node_modules/jsdoc": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.3.3.tgz", + "integrity": "sha512-NrYBqA0e0WTYxBAXhwTJqBonYCzxCVSnfqga/CQmYDwVn+kXi8JH5VI9sKN6mb2MaD+VK/wJHWlCkZqxyjgxXQ==", + "dev": true, + "dependencies": { + "async": "~0.9.0", + "catharsis": "~0.8.7", + "escape-string-regexp": "~1.0.2", + "esprima": "1.2.5", + "js2xmlparser": "~0.1.7", + "marked": "~0.3.2", + "requizzle": "~0.2.0", + "strip-json-comments": "~1.0.2", + "taffydb": "https://github.com/hegemonic/taffydb/tarball/7d100bcee0e997ee4977e273cdce60bd8933050e", + "underscore": "~1.7.0", + "wrench": "~1.5.8" + }, + "bin": { + "jsdoc": "jsdoc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/marked": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", + "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", + "dev": true, + "bin": { + "marked": "bin/marked" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optjs": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", + "integrity": "sha512-f8lTJm4LKirX+45xsFhuRNjA4f46QVLQKfGoNH7e2AEWS+24eM4XNH4pQ8Tw2LISCIvbST/wNcLdtgvgcqVaxA==" + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requizzle": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", + "integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", + "dev": true, + "bin": { + "strip-json-comments": "cli.js" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/taffydb": { + "version": "2.6.2", + "resolved": "https://github.com/hegemonic/taffydb/tarball/7d100bcee0e997ee4977e273cdce60bd8933050e", + "integrity": "sha512-iWx+oupEjIH7KA4mYZKlPS/C7by3/aVcFPmFq6P/DYeoa3m3NH0ojTuvrwBBkJcUPbLN2yAhFmcU2jRJpxQGnw==", + "dev": true + }, + "node_modules/underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha512-cp0oQQyZhUM1kpJDLdGO1jPZHgS/MpzoWYfe9+CM2h/QGDZlqwT2T3YGukuBdaNJ/CAPoeyAZRRHz8JFo176vA==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/wrench": { + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/wrench/-/wrench-1.5.9.tgz", + "integrity": "sha512-QH+8W9n0UGDAxnRDOkQzG1N277GTaBgMDNdckluqnAY773njfs1gfo867IbMMbGjOZZof+zlRIUeQ9XN8VUHUQ==", + "deprecated": "wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.", + "dev": true, + "engines": { + "node": ">=0.1.97" + } + } + } +} diff --git a/package.json b/package.json index 84b058c..dea6355 100644 --- a/package.json +++ b/package.json @@ -1,36 +1,22 @@ { - "name": "metascript", + "name": "@uniformdev/metascript", "version": "1.0.0", - "author": "Daniel Wirtz ", - "description": "Sophisticated meta programming in JavaScript, e.g. to build different versions of a library from a single source tree.", + "author": "@uniformdev/metascript", + "description": "A fork of MetaScript, originally created by dcodeIO. Maintained and updated dependencies.", "main": "./MetaScript.js", "bin": { "metascript": "./bin/metascript", "metac": "./bin/metac" }, - "repository": { - "type": "git", - "url": "https://github.com/dcodeIO/MetaScript.git" - }, - "bugs": { - "url": "https://github.com/dcodeIO/MetaScript/issues" - }, - "keywords": [ - "JavaScript", - "meta programming", - "meta", - "build", - "preprocessor", - "utility" - ], + "keywords": [], + "license": "Apache-2.0", "dependencies": { "ascli": "~0.3", - "glob": "~3.2" + "glob": "^5" }, "devDependencies": { "jsdoc": "~3.3" }, - "license": "Apache-2.0", "engines": { "node": ">=0.8" }, @@ -39,5 +25,8 @@ "test": "node tests/test.js", "make": "npm test && npm run-script jsdoc", "jsdoc": "node node_modules/jsdoc/jsdoc.js -c jsdoc.json" + }, + "publishConfig": { + "access": "public" } -} +} \ No newline at end of file