mlcl 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +31 -0
- package/.eslintrc.json +54 -0
- package/LICENSE +200 -0
- package/README.md +101 -0
- package/babel.config.json +10 -0
- package/build/API/authorization.js +107 -0
- package/build/API/client.js +11 -0
- package/build/API/index.js +8 -0
- package/build/API/molecule/index.js +11 -0
- package/build/API/molecule/types.js +6 -0
- package/build/API/resource/device/index.js +12 -0
- package/build/API/resource/device/types.js +6 -0
- package/build/API/resource/device/utilities/confirmSshKey.js +20 -0
- package/build/API/resource/device/utilities/index.js +7 -0
- package/build/API/resource/device/utilities/sendSshKey.js +64 -0
- package/build/API/resource/index.js +10 -0
- package/build/API/resource/molecule/index.js +12 -0
- package/build/API/resource/molecule/types.js +6 -0
- package/build/API/resource/molecule/utilities/getPlan.js +15 -0
- package/build/API/resource/molecule/utilities/index.js +6 -0
- package/build/API/resource/payment/index.js +9 -0
- package/build/API/resource/payment/plans.js +28 -0
- package/build/API/resource/payment/platform.js +7 -0
- package/build/API/resource/payment/platforms/apple/index.js +21 -0
- package/build/API/resource/payment/platforms/apple/plans/appleMonthly.js +17 -0
- package/build/API/resource/payment/platforms/apple/plans/appleYearly.js +18 -0
- package/build/API/resource/payment/platforms/apple/plans/index.js +7 -0
- package/build/API/resource/payment/platforms/google/index.js +21 -0
- package/build/API/resource/payment/platforms/google/plans/googleMonthly.js +17 -0
- package/build/API/resource/payment/platforms/google/plans/googleYearly.js +18 -0
- package/build/API/resource/payment/platforms/google/plans/index.js +7 -0
- package/build/API/resource/payment/platforms/index.js +8 -0
- package/build/API/resource/payment/platforms/stripe/index.js +25 -0
- package/build/API/resource/payment/platforms/stripe/plans/index.js +11 -0
- package/build/API/resource/payment/platforms/stripe/plans/stripeBusinessMolecule.js +21 -0
- package/build/API/resource/payment/platforms/stripe/plans/stripeMonthly.js +18 -0
- package/build/API/resource/payment/platforms/stripe/plans/stripeMonthlyMolecule.js +18 -0
- package/build/API/resource/payment/platforms/stripe/plans/stripeSingleUseMolecule.js +19 -0
- package/build/API/resource/payment/platforms/stripe/plans/stripeUnlimitedUseMolecule.js +19 -0
- package/build/API/resource/payment/platforms/stripe/plans/stripeYearly.js +19 -0
- package/build/API/resource/payment/types.js +6 -0
- package/build/API/resource/types.js +6 -0
- package/build/API/resource/user/index.js +15 -0
- package/build/API/resource/user/types.js +6 -0
- package/build/API/resource/user/utilities/getPlan.js +12 -0
- package/build/API/resource/user/utilities/index.js +7 -0
- package/build/API/resource/user/utilities/logIn.js +60 -0
- package/build/cli.js +15 -0
- package/build/commands/add-ssh-key.js +24 -0
- package/build/commands/buy.js +70 -0
- package/build/commands/clone.js +329 -0
- package/build/commands/index.js +17 -0
- package/build/commands/info.js +33 -0
- package/build/commands/login.js +20 -0
- package/build/commands/logout.js +23 -0
- package/build/commands/molecule/index.js +11 -0
- package/build/commands/molecule/types.js +6 -0
- package/build/commands/remove-ssh-key.js +36 -0
- package/build/commands/select.js +98 -0
- package/build/commands/set-api-key.js +73 -0
- package/build/commands/subscribe.js +74 -0
- package/build/commands/unsubscribe.js +59 -0
- package/build/commands/utilities/asyncExec.js +6 -0
- package/build/commands/utilities/branchExists.js +13 -0
- package/build/commands/utilities/branchExistsSync.js +12 -0
- package/build/commands/utilities/checkoutSelectionBranch.js +49 -0
- package/build/commands/utilities/cherryPick.js +20 -0
- package/build/commands/utilities/cloneRepo.js +9 -0
- package/build/commands/utilities/convertNpmToYarn.js +60 -0
- package/build/commands/utilities/convertTypeDocToJSDoc.js +51 -0
- package/build/commands/utilities/convertTypeScriptToJavaScript.js +451 -0
- package/build/commands/utilities/enableMergeDrivers.js +50 -0
- package/build/commands/utilities/getCurrentBranch.js +11 -0
- package/build/commands/utilities/getCurrentBranchSync.js +7 -0
- package/build/commands/utilities/getRepoRootPath.js +7 -0
- package/build/commands/utilities/getRepoRootPathSync.js +13 -0
- package/build/commands/utilities/index.js +16 -0
- package/build/commands/utilities/npm-to-yarn.js +41 -0
- package/build/commands/utilities/ts-to-js.js +344 -0
- package/build/commands/version.js +14 -0
- package/build/commands/x-merge-json.js +33 -0
- package/build/config.js +5 -0
- package/build/environment.js +80 -0
- package/build/index.js +23 -0
- package/build/logger.js +12 -0
- package/build/pkg.js +5 -0
- package/build/repoConfig copy.js +5 -0
- package/build/repoConfig.js +5 -0
- package/build/types/global.js +6 -0
- package/build/types/index.js +6 -0
- package/build/userConfig.js +5 -0
- package/build/utilities/__tests__/getErrorMessage.js +26 -0
- package/build/utilities/__tests__/timeAgo.js +39 -0
- package/build/utilities/checkVersion.js +29 -0
- package/build/utilities/getErrorMessage.js +15 -0
- package/build/utilities/index.js +13 -0
- package/build/utilities/readConfig.js +19 -0
- package/build/utilities/readRepoConfig copy.js +20 -0
- package/build/utilities/readRepoConfig.js +19 -0
- package/build/utilities/readUserConfig.js +20 -0
- package/build/utilities/synchronizeUserConfig.js +25 -0
- package/build/utilities/timeAgo.js +42 -0
- package/build/utilities/userLoggedIn.js +24 -0
- package/build/utilities/writeConfig.js +8 -0
- package/build/utilities/writeRepoConfig copy.js +9 -0
- package/build/utilities/writeRepoConfig.js +10 -0
- package/build/utilities/writeUserConfig.js +11 -0
- package/jest.config.json +11 -0
- package/package.json +56 -0
- package/src/API/authorization.ts +143 -0
- package/src/API/client.ts +12 -0
- package/src/API/index.ts +10 -0
- package/src/API/resource/device/index.ts +27 -0
- package/src/API/resource/device/types.ts +80 -0
- package/src/API/resource/device/utilities/confirmSshKey.ts +25 -0
- package/src/API/resource/device/utilities/index.ts +8 -0
- package/src/API/resource/device/utilities/sendSshKey.ts +80 -0
- package/src/API/resource/index.ts +12 -0
- package/src/API/resource/molecule/index.ts +30 -0
- package/src/API/resource/molecule/types.ts +332 -0
- package/src/API/resource/molecule/utilities/getPlan.ts +21 -0
- package/src/API/resource/molecule/utilities/index.ts +7 -0
- package/src/API/resource/payment/index.ts +12 -0
- package/src/API/resource/payment/plans.ts +32 -0
- package/src/API/resource/payment/platform.ts +11 -0
- package/src/API/resource/payment/platforms/apple/index.ts +25 -0
- package/src/API/resource/payment/platforms/apple/plans/appleMonthly.ts +19 -0
- package/src/API/resource/payment/platforms/apple/plans/appleYearly.ts +20 -0
- package/src/API/resource/payment/platforms/apple/plans/index.ts +9 -0
- package/src/API/resource/payment/platforms/google/index.ts +25 -0
- package/src/API/resource/payment/platforms/google/plans/googleMonthly.ts +19 -0
- package/src/API/resource/payment/platforms/google/plans/googleYearly.ts +20 -0
- package/src/API/resource/payment/platforms/google/plans/index.ts +9 -0
- package/src/API/resource/payment/platforms/index.ts +10 -0
- package/src/API/resource/payment/platforms/stripe/index.ts +29 -0
- package/src/API/resource/payment/platforms/stripe/plans/index.ts +12 -0
- package/src/API/resource/payment/platforms/stripe/plans/stripeBusinessMolecule.ts +23 -0
- package/src/API/resource/payment/platforms/stripe/plans/stripeMonthly.ts +20 -0
- package/src/API/resource/payment/platforms/stripe/plans/stripeMonthlyMolecule.ts +20 -0
- package/src/API/resource/payment/platforms/stripe/plans/stripeSingleUseMolecule.ts +21 -0
- package/src/API/resource/payment/platforms/stripe/plans/stripeUnlimitedUseMolecule.ts +21 -0
- package/src/API/resource/payment/platforms/stripe/plans/stripeYearly.ts +21 -0
- package/src/API/resource/payment/types.ts +201 -0
- package/src/API/resource/types.ts +169 -0
- package/src/API/resource/user/index.ts +29 -0
- package/src/API/resource/user/types.ts +131 -0
- package/src/API/resource/user/utilities/getPlan.ts +16 -0
- package/src/API/resource/user/utilities/index.ts +8 -0
- package/src/API/resource/user/utilities/logIn.ts +71 -0
- package/src/commands/add-ssh-key.ts +30 -0
- package/src/commands/buy.ts +83 -0
- package/src/commands/clone.ts +363 -0
- package/src/commands/index.ts +19 -0
- package/src/commands/info.ts +40 -0
- package/src/commands/login.ts +24 -0
- package/src/commands/logout.ts +27 -0
- package/src/commands/remove-ssh-key.ts +42 -0
- package/src/commands/subscribe.ts +84 -0
- package/src/commands/unsubscribe.ts +67 -0
- package/src/commands/utilities/asyncExec.ts +7 -0
- package/src/commands/utilities/branchExists.ts +15 -0
- package/src/commands/utilities/checkoutSelectionBranch.ts +62 -0
- package/src/commands/utilities/cherryPick.ts +23 -0
- package/src/commands/utilities/cloneRepo.ts +10 -0
- package/src/commands/utilities/convertNpmToYarn.ts +71 -0
- package/src/commands/utilities/convertTypeDocToJSDoc.ts +55 -0
- package/src/commands/utilities/convertTypeScriptToJavaScript.ts +526 -0
- package/src/commands/utilities/enableMergeDrivers.ts +55 -0
- package/src/commands/utilities/getCurrentBranch.ts +14 -0
- package/src/commands/utilities/getRepoRootPathSync.ts +13 -0
- package/src/commands/utilities/index.ts +17 -0
- package/src/commands/version.ts +22 -0
- package/src/commands/x-merge-json.ts +41 -0
- package/src/environment.ts +88 -0
- package/src/index.ts +30 -0
- package/src/logger.ts +29 -0
- package/src/pkg.ts +11 -0
- package/src/repoConfig.ts +6 -0
- package/src/types/global.ts +26 -0
- package/src/types/index.ts +53 -0
- package/src/types/process.env.d.ts +56 -0
- package/src/userConfig.ts +6 -0
- package/src/utilities/__tests__/getErrorMessage.ts +32 -0
- package/src/utilities/__tests__/timeAgo.ts +46 -0
- package/src/utilities/checkVersion.ts +31 -0
- package/src/utilities/getErrorMessage.ts +30 -0
- package/src/utilities/index.ts +14 -0
- package/src/utilities/readRepoConfig.ts +22 -0
- package/src/utilities/readUserConfig.ts +24 -0
- package/src/utilities/synchronizeUserConfig.ts +26 -0
- package/src/utilities/timeAgo.ts +39 -0
- package/src/utilities/userLoggedIn.ts +28 -0
- package/src/utilities/writeRepoConfig.ts +11 -0
- package/src/utilities/writeUserConfig.ts +13 -0
- package/tsconfig.json +25 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { asyncExec } from './asyncExec.js'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Resolves `true` if the branch exists.
|
|
5
|
+
*/
|
|
6
|
+
export const branchExists = async (branchName: string, repoPath = ``, branchPath = `refs/heads`) => {
|
|
7
|
+
try {
|
|
8
|
+
const result = await asyncExec(`git${repoPath ? ` -C "${repoPath}"` : ``} show-ref ${branchPath}/${branchName}`)
|
|
9
|
+
|
|
10
|
+
return Boolean(result.stdout)
|
|
11
|
+
} catch (error) {
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return false
|
|
15
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { asyncExec } from './asyncExec.js'
|
|
2
|
+
import { branchExists } from './branchExists.js'
|
|
3
|
+
import { getCurrentBranch } from './getCurrentBranch.js'
|
|
4
|
+
import { logger } from '../../logger.js'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Checks out the branch for the Molecule selection.
|
|
8
|
+
*
|
|
9
|
+
* If it does not yet exist, it will be created as an empty branch.
|
|
10
|
+
*
|
|
11
|
+
* Returns `true` if an empty branch was created.
|
|
12
|
+
*/
|
|
13
|
+
export const checkoutSelectionBranch = async (
|
|
14
|
+
selectionHash: string,
|
|
15
|
+
repoPath = ``,
|
|
16
|
+
branchPath = ``,
|
|
17
|
+
resetIfLocalExists = false,
|
|
18
|
+
) => {
|
|
19
|
+
const branchName = `mlcl-${selectionHash}`
|
|
20
|
+
|
|
21
|
+
if (await branchExists(branchName, repoPath, branchPath)) {
|
|
22
|
+
if ((await getCurrentBranch(repoPath)) === branchName) {
|
|
23
|
+
logger.info(`Already on branch ${branchName}.`)
|
|
24
|
+
return false
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (/^remotes\/(.+)/.test(branchPath)) {
|
|
28
|
+
logger.info(`Branch ${branchName} exists at ${branchPath}.`)
|
|
29
|
+
logger.info(`Checking out ${branchName} with tracking from ${branchPath}...`)
|
|
30
|
+
await asyncExec(`git${repoPath ? ` -C "${repoPath}"` : ``} checkout --track ${branchPath.replace(/^remotes\//, ``)}/${branchName}`)
|
|
31
|
+
} else {
|
|
32
|
+
logger.info(`Checking out branch ${branchName}...`)
|
|
33
|
+
await asyncExec(`git${repoPath ? ` -C "${repoPath}"` : ``} checkout ${branchName}`)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return false
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const localBranchExists = await branchExists(branchName, repoPath)
|
|
40
|
+
|
|
41
|
+
if (localBranchExists) {
|
|
42
|
+
logger.info(`Branch ${branchName} already exists locally!`)
|
|
43
|
+
|
|
44
|
+
if (!resetIfLocalExists) {
|
|
45
|
+
return false
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
// Branch does not yet exist, so create it.
|
|
49
|
+
logger.info(`Creating new orphan branch ${branchName}...`)
|
|
50
|
+
await asyncExec(`git${repoPath ? ` -C "${repoPath}"` : ``} checkout --orphan ${branchName}`)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Reset it to an empty repository.
|
|
54
|
+
logger.info(`Resetting branch to an empty repository...`)
|
|
55
|
+
await asyncExec(`git${repoPath ? ` -C "${repoPath}"` : ``} rm -rf .`)
|
|
56
|
+
|
|
57
|
+
logger.info(`Creating empty initial commit...`)
|
|
58
|
+
await asyncExec(`git${repoPath ? ` -C "${repoPath}"` : ``} commit --allow-empty -m "initialize empty repository"`)
|
|
59
|
+
logger.info(`Branch ${branchName} is ready for assembly.`)
|
|
60
|
+
|
|
61
|
+
return true
|
|
62
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { asyncExec } from './asyncExec.js'
|
|
2
|
+
import { logger } from '../../logger.js'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Cherry picks the commit onto the current branch.
|
|
6
|
+
*
|
|
7
|
+
* Returns `true` if successful.
|
|
8
|
+
*/
|
|
9
|
+
export const cherryPick = async (commitHash: string, repoPath = ``, parameters = ``) => {
|
|
10
|
+
try {
|
|
11
|
+
const { stderr } = await asyncExec(`git${repoPath ? ` -C "${repoPath}"` : ``} cherry-pick ${commitHash} ${parameters}`)
|
|
12
|
+
|
|
13
|
+
if (stderr) {
|
|
14
|
+
throw new Error(stderr)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return true
|
|
18
|
+
} catch (error) {
|
|
19
|
+
logger.error(error)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return false
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { logger } from '../../logger.js'
|
|
2
|
+
import { asyncExec } from './asyncExec.js'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Clones a repository by URL to the specified path.
|
|
6
|
+
*/
|
|
7
|
+
export const cloneRepo = (repoUrl: string, repoPath: string) => {
|
|
8
|
+
logger.info(`Cloning ${repoUrl} into ${repoPath}...`)
|
|
9
|
+
return asyncExec(`git clone ${repoUrl} ${repoPath}`)
|
|
10
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import fs from 'fs'
|
|
2
|
+
import path from 'path'
|
|
3
|
+
import glob from 'glob'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A very quick and dirty hacked together script to convert an NPM codebase to a Yarn one.
|
|
7
|
+
*/
|
|
8
|
+
export const convertNpmToYarn = async (cwd = `.`) => {
|
|
9
|
+
try {
|
|
10
|
+
// Add Yarn to prerequisites in README.
|
|
11
|
+
const readmePath = path.join(cwd, `README.md`)
|
|
12
|
+
let README = await fs.promises.readFile(readmePath, `utf8`)
|
|
13
|
+
|
|
14
|
+
README = README.replace(
|
|
15
|
+
`- [Node.js](https://nodejs.org/) (version 16)`,
|
|
16
|
+
`- [Node.js](https://nodejs.org/) (version 16)
|
|
17
|
+
|
|
18
|
+
- [Yarn](https://yarnpkg.com/getting-started/install)
|
|
19
|
+
|
|
20
|
+
- The recommended way to install Yarn is by enabling [Corepack](https://github.com/nodejs/corepack), which is included by default with the latest Node.js version, but it is opt-in. To enable Corepack, run \`corepack enable\` in your console, which may require elevated permissions (if on Windows, run command prompt as administrator). `
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
await fs.promises.writeFile(readmePath, README)
|
|
24
|
+
} catch (error) {
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
// Replace all "npm" descriptions/instructions with "yarn".
|
|
29
|
+
await new Promise<void>((resolve, reject) => {
|
|
30
|
+
glob(`{*.md,**!(node_modules)/*.md,src/**/*.{js,jsx,ts,tsx}}`, { cwd }, async (error, files) => {
|
|
31
|
+
if (error) {
|
|
32
|
+
reject(error)
|
|
33
|
+
return
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const replace = async (file: string) => {
|
|
37
|
+
const filePath = path.join(cwd, file)
|
|
38
|
+
const npmContents = await fs.promises.readFile(filePath, `utf8`)
|
|
39
|
+
const yarnContents = npmContents
|
|
40
|
+
.replace(/npm run/g, `yarn run`)
|
|
41
|
+
.replace(/npm start/g, `yarn start`)
|
|
42
|
+
.replace(/npm install/g, `yarn install`)
|
|
43
|
+
.replace(/npm version/g, `yarn version`)
|
|
44
|
+
.replace(/npm test/g, `yarn test`)
|
|
45
|
+
.replace(/npx cap/g, `yarn run cap`)
|
|
46
|
+
|
|
47
|
+
if (npmContents !== yarnContents) {
|
|
48
|
+
await fs.promises.writeFile(filePath, yarnContents)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
await replace(`package.json`)
|
|
53
|
+
|
|
54
|
+
try {
|
|
55
|
+
await fs.promises.access(path.join(cwd, `electron/package.json`), fs.constants.R_OK | fs.constants.W_OK)
|
|
56
|
+
await replace(`electron/package.json`)
|
|
57
|
+
} catch (error) {
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
await Promise.all(files.map(file => replace(file)))
|
|
61
|
+
|
|
62
|
+
// yarn install
|
|
63
|
+
// git add yarn.lock
|
|
64
|
+
// git add electron/yarn.lock
|
|
65
|
+
|
|
66
|
+
resolve()
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
} catch (error) {
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import fs from 'fs'
|
|
2
|
+
import path from 'path'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A very quick and dirty hacked together script to convert TypeDoc usage to JSDoc.
|
|
6
|
+
*/
|
|
7
|
+
export const convertTypeDocToJSDoc = async (cwd = `.`) => {
|
|
8
|
+
try {
|
|
9
|
+
// Replace `typedoc` with `jsdoc` in `package.json`.
|
|
10
|
+
const packageJsonPath = path.join(cwd, `package.json`)
|
|
11
|
+
const packageJson = JSON.parse(await fs.promises.readFile(packageJsonPath, `utf8`))
|
|
12
|
+
|
|
13
|
+
delete packageJson.devDependencies.typedoc
|
|
14
|
+
packageJson.devDependencies.jsdoc = `^3.6.10`
|
|
15
|
+
packageJson.scripts.docs = `jsdoc -r -c jsdoc.json && open-cli ./docs/index.html`
|
|
16
|
+
|
|
17
|
+
await fs.promises.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2))
|
|
18
|
+
} catch (error) {
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
// Replace `typedoc.json` with `jsdoc.json`.
|
|
23
|
+
await fs.promises.rm(path.join(cwd, `typedoc.json`))
|
|
24
|
+
await fs.promises.writeFile(path.join(cwd, `jsdoc.json`), JSON.stringify({
|
|
25
|
+
"source": {
|
|
26
|
+
"include": "./src",
|
|
27
|
+
"includePattern": "\\.jsx?$",
|
|
28
|
+
"excludePattern": "(/|\\\\)__tests__(/|\\\\)|\\.(spec|test)\\.jsx?$"
|
|
29
|
+
},
|
|
30
|
+
"opts": {
|
|
31
|
+
"destination": "./docs",
|
|
32
|
+
"readme": "./README.md"
|
|
33
|
+
},
|
|
34
|
+
"plugins": [
|
|
35
|
+
"plugins/markdown"
|
|
36
|
+
]
|
|
37
|
+
}, null, 2))
|
|
38
|
+
} catch (error) {
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
try {
|
|
42
|
+
// Replace all TypeDoc info with JSDoc.
|
|
43
|
+
const readmePath = path.join(cwd, `README.md`)
|
|
44
|
+
let README = await fs.promises.readFile(readmePath, `utf8`)
|
|
45
|
+
|
|
46
|
+
README = README
|
|
47
|
+
.replace(/typedoc\.org/g, `jsdoc.app`)
|
|
48
|
+
.replace(/TypeDoc\.org/g, `JSDoc.app`)
|
|
49
|
+
.replace(/typedoc/g, `jsdoc`)
|
|
50
|
+
.replace(/TypeDoc/g, `JSDoc`)
|
|
51
|
+
|
|
52
|
+
await fs.promises.writeFile(readmePath, README)
|
|
53
|
+
} catch (error) {
|
|
54
|
+
}
|
|
55
|
+
}
|