Compare commits

...

31 Commits

Author SHA1 Message Date
bcomnes
86a0fba676 1.1.12 2022-12-20 16:32:49 +00:00
Bret Comnes
b5e74f0efd Update action to use node 16 2022-12-19 09:19:02 -07:00
Bret Comnes
1114060652 Merge pull request #113 from bcomnes/dependabot/npm_and_yarn/gh-release-7.0.0 2022-12-14 09:19:38 -07:00
dependabot[bot]
e00b896343 chore(deps-dev): bump gh-release from 6.0.4 to 7.0.0
Bumps [gh-release](https://github.com/ungoldman/gh-release) from 6.0.4 to 7.0.0.
- [Release notes](https://github.com/ungoldman/gh-release/releases)
- [Changelog](https://github.com/ungoldman/gh-release/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ungoldman/gh-release/compare/v6.0.4...v7.0.0)

---
updated-dependencies:
- dependency-name: gh-release
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-14 03:01:31 +00:00
Bret Comnes
056a8c9940 Merge pull request #112 from bcomnes/dependabot/npm_and_yarn/vercel/ncc-0.36.0
chore(deps-dev): bump @vercel/ncc from 0.34.0 to 0.36.0
2022-12-06 12:27:16 -07:00
dependabot[bot]
5a689c25d8 chore(deps-dev): bump @vercel/ncc from 0.34.0 to 0.36.0
Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.34.0 to 0.36.0.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.34.0...0.36.0)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-06 03:01:08 +00:00
Bret Comnes
3f1ce1ffb0 Merge pull request #111 from bcomnes/dependabot/npm_and_yarn/minimatch-5.1.1
chore(deps): bump minimatch from 5.1.0 to 5.1.1
2022-11-30 12:30:43 -07:00
dependabot[bot]
969ba2cc61 chore(deps): bump minimatch from 5.1.0 to 5.1.1
Bumps [minimatch](https://github.com/isaacs/minimatch) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v5.1.0...v5.1.1)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-30 03:01:18 +00:00
Bret Comnes
115b9e855f Update README.md 2022-11-19 13:15:50 -07:00
bcomnes
6fcd2fe52c 1.1.11 2022-11-07 04:03:37 +00:00
Bret Comnes
523524ca70 Merge branch 'master' of github.com:bcomnes/deploy-to-neocities 2022-11-06 21:02:25 -07:00
Bret Comnes
8fae4b2c6c Print error cause no matter what
Ensure that we print the error cause when we catch an error
2022-11-06 21:02:11 -07:00
Bret Comnes
c907c30f9c Merge pull request #107 from lime360/master
the site is open-source again
2022-10-25 09:54:18 -06:00
Kiril Misnikov
c7b4dca027 Update README.md 2022-10-25 14:30:25 +03:00
Bret Comnes
f0f33d7da4 Merge pull request #104 from lime360/master
info
2022-10-18 11:09:08 -07:00
dependabot[bot]
69e8a94c47 chore(deps): bump bcomnes/npm-bump from 2.0.2 to 2.1.0 (#105)
Bumps [bcomnes/npm-bump](https://github.com/bcomnes/npm-bump) from 2.0.2 to 2.1.0.
- [Release notes](https://github.com/bcomnes/npm-bump/releases)
- [Changelog](https://github.com/bcomnes/npm-bump/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bcomnes/npm-bump/compare/v2.0.2...v2.1.0)

---
updated-dependencies:
- dependency-name: bcomnes/npm-bump
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 03:03:39 +00:00
Kiril Misnikov
59a102c463 info
i removed my site from the list because many ppl (including me) are using neocities editor instead of this
2022-10-16 20:18:45 +03:00
bcomnes
4f62bb5b90 1.1.10 2022-10-03 15:57:03 +00:00
Bret Comnes
8f9be808b5 Bump async-neocities to 2.1.3 2022-10-03 09:55:25 -06:00
Bret Comnes
53bfeb132c Merge pull request #102 from bcomnes/dependabot/npm_and_yarn/actions/core-1.10.0
chore(deps): bump @actions/core from 1.9.1 to 1.10.0
2022-10-03 09:39:27 -06:00
Bret Comnes
853a9a7fe2 Merge pull request #103 from lime360/master
the site is open-source again
2022-10-03 09:38:56 -06:00
Kiril Misnikov
d98f2e152b the site is open-source again 2022-09-30 19:24:12 +00:00
dependabot[bot]
48b61f22d5 chore(deps): bump @actions/core from 1.9.1 to 1.10.0
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.9.1 to 1.10.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-30 03:08:21 +00:00
Bret Comnes
fe942e2bfe Merge pull request #100 from lime360/master
added notice about my site source code
2022-09-16 09:32:24 -06:00
Kiril Misnikov
de57ddf5ae added notice about my site source code 2022-09-16 09:09:15 +03:00
Bret Comnes
1f2e44c5ca Merge pull request #97 from lime360/master
Update README.md
2022-09-05 20:13:09 -06:00
Kiril Misnikov
f51969618c Update README.md 2022-09-05 12:28:08 +03:00
Bret Comnes
635243fdea Merge pull request #96 from bechnokid/patch-1 2022-08-24 14:42:38 -06:00
Bechno Kid
9808b8398b Add bechnokid.neocities.org to README.md
I can't even begin to tell you how useful this GitHub action has been to me. Thank you so much for making this!
2022-08-24 16:18:45 -04:00
Bret Comnes
cec985e2c2 Merge pull request #95 from ConorSheehan1/patch-1
add conorsheehan1.neocities.org
2022-08-14 18:23:34 -06:00
Conor Sheehan
90217b6969 add conorsheehan1.neocities.org 2022-08-14 23:09:27 +01:00
8 changed files with 379 additions and 75 deletions

View File

@@ -30,7 +30,7 @@ jobs:
registry-url: 'https://registry.npmjs.org'
- run: npm i
- run: npm test
- uses: bcomnes/npm-bump@v2.0.2
- uses: bcomnes/npm-bump@v2.1.0
with:
git_email: bcomnes@gmail.com
git_username: ${{ github.actor }}

View File

@@ -7,7 +7,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
## [v1.1.9](https://github.com/bcomnes/deploy-to-neocities/compare/v1.1.8...v1.1.9)
## [v1.1.12](https://github.com/bcomnes/deploy-to-neocities/compare/v1.1.11...v1.1.12)
### Merged
- chore(deps-dev): bump @vercel/ncc from 0.34.0 to 0.36.0 [`#112`](https://github.com/bcomnes/deploy-to-neocities/pull/112)
- chore(deps): bump minimatch from 5.1.0 to 5.1.1 [`#111`](https://github.com/bcomnes/deploy-to-neocities/pull/111)
### Commits
- Update action to use node 16 [`b5e74f0`](https://github.com/bcomnes/deploy-to-neocities/commit/b5e74f0efddc239968a312e1bae4501d3e84f9a9)
- Merge pull request #113 from bcomnes/dependabot/npm_and_yarn/gh-release-7.0.0 [`1114060`](https://github.com/bcomnes/deploy-to-neocities/commit/1114060652dade40eaacdea104051d6e13a096a3)
- chore(deps-dev): bump gh-release from 6.0.4 to 7.0.0 [`e00b896`](https://github.com/bcomnes/deploy-to-neocities/commit/e00b89634371d88950fa4f3ec2a8892888bc98e2)
## [v1.1.11](https://github.com/bcomnes/deploy-to-neocities/compare/v1.1.10...v1.1.11) - 2022-11-07
### Merged
- the site is open-source again [`#107`](https://github.com/bcomnes/deploy-to-neocities/pull/107)
- info [`#104`](https://github.com/bcomnes/deploy-to-neocities/pull/104)
- chore(deps): bump bcomnes/npm-bump from 2.0.2 to 2.1.0 [`#105`](https://github.com/bcomnes/deploy-to-neocities/pull/105)
### Commits
- Print error cause no matter what [`8fae4b2`](https://github.com/bcomnes/deploy-to-neocities/commit/8fae4b2c6c1923355b43f7dcfd2efdad7279ffc1)
- Update README.md [`c7b4dca`](https://github.com/bcomnes/deploy-to-neocities/commit/c7b4dca027b41fa09bc9d92efa5489238bc98a5a)
## [v1.1.10](https://github.com/bcomnes/deploy-to-neocities/compare/v1.1.9...v1.1.10) - 2022-10-03
### Merged
- chore(deps): bump @actions/core from 1.9.1 to 1.10.0 [`#102`](https://github.com/bcomnes/deploy-to-neocities/pull/102)
- the site is open-source again [`#103`](https://github.com/bcomnes/deploy-to-neocities/pull/103)
- added notice about my site source code [`#100`](https://github.com/bcomnes/deploy-to-neocities/pull/100)
- Update README.md [`#97`](https://github.com/bcomnes/deploy-to-neocities/pull/97)
- add conorsheehan1.neocities.org [`#95`](https://github.com/bcomnes/deploy-to-neocities/pull/95)
### Commits
- Bump async-neocities to 2.1.3 [`8f9be80`](https://github.com/bcomnes/deploy-to-neocities/commit/8f9be808b5b4f9e1d9a316b391c7c21acfcba3ad)
- Merge pull request #96 from bechnokid/patch-1 [`635243f`](https://github.com/bcomnes/deploy-to-neocities/commit/635243fdea7e5d224675222008031a553bc142c3)
- Add bechnokid.neocities.org to README.md [`9808b83`](https://github.com/bcomnes/deploy-to-neocities/commit/9808b8398bf70ac8e2a41172c74eb9f66e7d0d89)
## [v1.1.9](https://github.com/bcomnes/deploy-to-neocities/compare/v1.1.8...v1.1.9) - 2022-08-10
### Commits
@@ -110,8 +152,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
### Commits
- Fix static deploy stuff with bandaid [`fea2d47`](https://github.com/bcomnes/deploy-to-neocities/commit/fea2d4780c7a98bcdf5738c1c259d66ff115326a)
- Update site build and ncc [`def67b4`](https://github.com/bcomnes/deploy-to-neocities/commit/def67b48c6e28d4544d8dd2bd92ab53f56856e40)
- Fix static deploy stuff with bandaid [`fea2d47`](https://github.com/bcomnes/deploy-to-neocities/commit/fea2d4780c7a98bcdf5738c1c259d66ff115326a)
## [v1.1.1](https://github.com/bcomnes/deploy-to-neocities/compare/v1.1.0...v1.1.1) - 2021-08-20

View File

@@ -136,8 +136,11 @@ None.
- https://andri.dk/blog/2021/deploy-static-websites-anywhere
- https://github.com/PersonMeetup/frontiercorps ([frontiercorps.neocities.org](https://frontiercorps.neocities.org/))
- https://github.com/riastrad/cyberbspace ([cyberb.space](https://cyberb.space))
- https://github.com/lime360/lime360.neocities.org ([lime360.neocities.org](https://lime360.neocities.org/))
- https://github.com/rogerahuntley/neocities-site ([stealdog.neocities.org](https://stealdog.neocities.org))
- https://github.com/ConorSheehan1/conorsheehan1.neocities.org ([conorsheehan1.neocities.org](https://conorsheehan1.neocities.org))
- https://github.com/bechnokid/neocities ([bechnokid.neocities.org](https://bechnokid.neocities.org))
- https://github.com/lime360/website ([lime360.neocities.org](https://lime360.neocities.org))
- [See more!](https://github.com/bcomnes/deploy-to-neocities/network/dependents)
- ...PR your site when you set it up!
## See also

View File

@@ -19,5 +19,5 @@ inputs:
description: A glob string that prevents matched files from ever being deleted.
required: false
runs:
using: 'node12'
using: 'node16'
main: 'dist/index.js'

381
dist/index.js vendored
View File

@@ -140,7 +140,6 @@ const file_command_1 = __nccwpck_require__(717);
const utils_1 = __nccwpck_require__(5278);
const os = __importStar(__nccwpck_require__(2037));
const path = __importStar(__nccwpck_require__(1017));
const uuid_1 = __nccwpck_require__(5840);
const oidc_utils_1 = __nccwpck_require__(8041);
/**
* The code to exit an action
@@ -170,20 +169,9 @@ function exportVariable(name, val) {
process.env[name] = convertedVal;
const filePath = process.env['GITHUB_ENV'] || '';
if (filePath) {
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
// These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter.
if (name.includes(delimiter)) {
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
}
if (convertedVal.includes(delimiter)) {
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
}
const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
file_command_1.issueCommand('ENV', commandValue);
}
else {
command_1.issueCommand('set-env', { name }, convertedVal);
return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));
}
command_1.issueCommand('set-env', { name }, convertedVal);
}
exports.exportVariable = exportVariable;
/**
@@ -201,7 +189,7 @@ exports.setSecret = setSecret;
function addPath(inputPath) {
const filePath = process.env['GITHUB_PATH'] || '';
if (filePath) {
file_command_1.issueCommand('PATH', inputPath);
file_command_1.issueFileCommand('PATH', inputPath);
}
else {
command_1.issueCommand('add-path', {}, inputPath);
@@ -241,7 +229,10 @@ function getMultilineInput(name, options) {
const inputs = getInput(name, options)
.split('\n')
.filter(x => x !== '');
return inputs;
if (options && options.trimWhitespace === false) {
return inputs;
}
return inputs.map(input => input.trim());
}
exports.getMultilineInput = getMultilineInput;
/**
@@ -274,8 +265,12 @@ exports.getBooleanInput = getBooleanInput;
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setOutput(name, value) {
const filePath = process.env['GITHUB_OUTPUT'] || '';
if (filePath) {
return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));
}
process.stdout.write(os.EOL);
command_1.issueCommand('set-output', { name }, value);
command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));
}
exports.setOutput = setOutput;
/**
@@ -404,7 +399,11 @@ exports.group = group;
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function saveState(name, value) {
command_1.issueCommand('save-state', { name }, value);
const filePath = process.env['GITHUB_STATE'] || '';
if (filePath) {
return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));
}
command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));
}
exports.saveState = saveState;
/**
@@ -470,13 +469,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.issueCommand = void 0;
exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
// We use any as a valid input type
/* eslint-disable @typescript-eslint/no-explicit-any */
const fs = __importStar(__nccwpck_require__(7147));
const os = __importStar(__nccwpck_require__(2037));
const uuid_1 = __nccwpck_require__(5840);
const utils_1 = __nccwpck_require__(5278);
function issueCommand(command, message) {
function issueFileCommand(command, message) {
const filePath = process.env[`GITHUB_${command}`];
if (!filePath) {
throw new Error(`Unable to find environment variable for file command ${command}`);
@@ -488,7 +488,22 @@ function issueCommand(command, message) {
encoding: 'utf8'
});
}
exports.issueCommand = issueCommand;
exports.issueFileCommand = issueFileCommand;
function prepareKeyValueMessage(key, value) {
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
const convertedValue = utils_1.toCommandValue(value);
// These should realistically never happen, but just in case someone finds a
// way to exploit uuid generation let's not allow keys or values that contain
// the delimiter.
if (key.includes(delimiter)) {
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
}
if (convertedValue.includes(delimiter)) {
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
}
return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
}
exports.prepareKeyValueMessage = prepareKeyValueMessage;
//# sourceMappingURL=file-command.js.map
/***/ }),
@@ -1962,6 +1977,7 @@ const fetch = __nccwpck_require__(467)
const { URL } = __nccwpck_require__(7310)
const qs = __nccwpck_require__(3477)
const os = __nccwpck_require__(2037)
const { ErrorWithCause } = __nccwpck_require__(702)
const { neocitiesLocalDiff } = __nccwpck_require__(8140)
const pkg = __nccwpck_require__(926)
@@ -2162,13 +2178,12 @@ class NeocitiesAPIClient {
try {
const result = await fetch(url, reqOpts).then(handleResponse)
results.push(result)
} catch (e) {
throw new Error('Neocities API error', {
cause: {
error: e,
results
}
} catch (err) {
const wrappedError = new ErrorWithCause('Neocities API error', {
cause: err
})
wrappedError.results = results
throw wrappedError
} finally {
statsCb({ stage: ERROR, status: STOP })
}
@@ -2307,14 +2322,13 @@ class NeocitiesAPIClient {
try {
await Promise.all(work)
} catch (e) {
} catch (err) {
// Wrap error with stats so that we don't lose all that context
throw new Error('Error uploading files', {
cause: {
error: e,
stats: stats()
}
const wrappedError = new ErrorWithCause('Error uploading files', {
cause: err
})
wrappedError.stats = stats()
throw wrappedError
} finally {
statsCb({ stage: ERROR, status: STOP })
}
@@ -2381,7 +2395,7 @@ const crypto = __nccwpck_require__(6113)
const util = __nccwpck_require__(3837)
const fs = __nccwpck_require__(7147)
const ppump = util.promisify(__nccwpck_require__(8341))
const ppump = util.promisify(__nccwpck_require__(5952))
/**
* neocitiesLocalDiff returns an array of files to delete and update and some useful stats.
@@ -2645,7 +2659,7 @@ module.exports = statsHandler
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
const { Writable, Transform } = __nccwpck_require__(5147)
const pump = __nccwpck_require__(8341)
const pump = __nccwpck_require__(5952)
const pumpify = __nccwpck_require__(212)
async function getStreamsLength (readables) {
@@ -4820,6 +4834,7 @@ const EMPTY = ''
const SPACE = ' '
const ESCAPE = '\\'
const REGEX_TEST_BLANK_LINE = /^\s+$/
const REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/
const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/
const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/
const REGEX_SPLITALL_CRLF = /\r?\n/g
@@ -4831,10 +4846,14 @@ const REGEX_SPLITALL_CRLF = /\r?\n/g
const REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/
const SLASH = '/'
const KEY_IGNORE = typeof Symbol !== 'undefined'
? Symbol.for('node-ignore')
/* istanbul ignore next */
: 'node-ignore'
// Do not use ternary expression here, since "istanbul ignore next" is buggy
let TMP_KEY_IGNORE = 'node-ignore'
/* istanbul ignore else */
if (typeof Symbol !== 'undefined') {
TMP_KEY_IGNORE = Symbol.for('node-ignore')
}
const KEY_IGNORE = TMP_KEY_IGNORE
const define = (object, key, value) =>
Object.defineProperty(object, key, {value})
@@ -5001,18 +5020,27 @@ const REPLACERS = [
: '\\/.+'
],
// intermediate wildcards
// normal intermediate wildcards
[
// Never replace escaped '*'
// ignore rule '\*' will match the path '*'
// 'abc.*/' -> go
// 'abc.*' -> skip this rule
/(^|[^\\]+)\\\*(?=.+)/g,
// 'abc.*' -> skip this rule,
// coz trailing single wildcard will be handed by [trailing wildcard]
/(^|[^\\]+)(\\\*)+(?=.+)/g,
// '*.js' matches '.js'
// '*.js' doesn't match 'abc'
(_, p1) => `${p1}[^\\/]*`
(_, p1, p2) => {
// 1.
// > An asterisk "*" matches anything except a slash.
// 2.
// > Other consecutive asterisks are considered regular asterisks
// > and will match according to the previous rules.
const unescaped = p2.replace(/\\\*/g, '[^\\/]*')
return p1 + unescaped
}
],
[
@@ -5123,6 +5151,7 @@ const isString = subject => typeof subject === 'string'
const checkPattern = pattern => pattern
&& isString(pattern)
&& !REGEX_TEST_BLANK_LINE.test(pattern)
&& !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)
// > A line starting with # serves as a comment.
&& pattern.indexOf('#') !== 0
@@ -5388,7 +5417,7 @@ module.exports = factory
// Windows
// --------------------------------------------------------------
/* istanbul ignore if */
/* istanbul ignore if */
if (
// Detect `process` so that it can run in browsers.
typeof process !== 'undefined'
@@ -6422,7 +6451,7 @@ class Minimatch {
negateOffset++
}
if (negateOffset) this.pattern = pattern.substr(negateOffset)
if (negateOffset) this.pattern = pattern.slice(negateOffset)
this.negate = negate
}
@@ -6798,7 +6827,7 @@ class Minimatch {
} catch (er) {
// not a valid class!
sp = this.parse(cs, SUBPARSE)
re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
re = re.substring(0, reClassStart) + '\\[' + sp[0] + '\\]'
hasMagic = hasMagic || sp[1]
inClass = false
continue
@@ -6831,9 +6860,9 @@ class Minimatch {
// this is a huge pita. We now have to re-walk
// the contents of the would-be class to re-translate
// any characters that were passed through as-is
cs = pattern.substr(classStart + 1)
cs = pattern.slice(classStart + 1)
sp = this.parse(cs, SUBPARSE)
re = re.substr(0, reClassStart) + '\\[' + sp[0]
re = re.substring(0, reClassStart) + '\\[' + sp[0]
hasMagic = hasMagic || sp[1]
}
@@ -9033,6 +9062,216 @@ function onceStrict (fn) {
}
/***/ }),
/***/ 702:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
const { ErrorWithCause } = __nccwpck_require__(8341); // linemod-replace-with: export { ErrorWithCause } from './lib/error-with-cause.mjs';
const { // linemod-replace-with: export {
findCauseByReference,
getErrorCause,
messageWithCauses,
stackWithCauses,
} = __nccwpck_require__(7343); // linemod-replace-with: } from './lib/helpers.mjs';
module.exports = { // linemod-remove
ErrorWithCause, // linemod-remove
findCauseByReference, // linemod-remove
getErrorCause, // linemod-remove
stackWithCauses, // linemod-remove
messageWithCauses, // linemod-remove
}; // linemod-remove
/***/ }),
/***/ 8341:
/***/ ((module) => {
"use strict";
/** @template [T=undefined] */
class ErrorWithCause extends Error { // linemod-prefix-with: export
/**
* @param {string} message
* @param {{ cause?: T }} options
*/
constructor (message, { cause } = {}) {
super(message);
/** @type {string} */
this.name = ErrorWithCause.name;
if (cause) {
/** @type {T} */
this.cause = cause;
}
/** @type {string} */
this.message = message;
}
}
module.exports = { // linemod-remove
ErrorWithCause, // linemod-remove
}; // linemod-remove
/***/ }),
/***/ 7343:
/***/ ((module) => {
"use strict";
/**
* @template {Error} T
* @param {unknown} err
* @param {new(...args: any[]) => T} reference
* @returns {T|undefined}
*/
const findCauseByReference = (err, reference) => { // linemod-prefix-with: export
if (!err || !reference) return;
if (!(err instanceof Error)) return;
if (
!(reference.prototype instanceof Error) &&
// @ts-ignore
reference !== Error
) return;
/**
* Ensures we don't go circular
*
* @type {Set<Error>}
*/
const seen = new Set();
/** @type {Error|undefined} */
let currentErr = err;
while (currentErr && !seen.has(currentErr)) {
seen.add(currentErr);
if (currentErr instanceof reference) {
return currentErr;
}
currentErr = getErrorCause(currentErr);
}
};
/**
* @param {Error|{ cause?: unknown|(()=>err)}} err
* @returns {Error|undefined}
*/
const getErrorCause = (err) => { // linemod-prefix-with: export
if (!err || typeof err !== 'object' || !('cause' in err)) {
return;
}
// VError / NError style causes
if (typeof err.cause === 'function') {
const causeResult = err.cause();
return causeResult instanceof Error
? causeResult
: undefined;
} else {
return err.cause instanceof Error
? err.cause
: undefined;
}
};
/**
* Internal method that keeps a track of which error we have already added, to avoid circular recursion
*
* @private
* @param {Error} err
* @param {Set<Error>} seen
* @returns {string}
*/
const _stackWithCauses = (err, seen) => {
if (!(err instanceof Error)) return '';
const stack = err.stack || '';
// Ensure we don't go circular or crazily deep
if (seen.has(err)) {
return stack + '\ncauses have become circular...';
}
const cause = getErrorCause(err);
// TODO: Follow up in https://github.com/nodejs/node/issues/38725#issuecomment-920309092 on how to log stuff
if (cause) {
seen.add(err);
return (stack + '\ncaused by: ' + _stackWithCauses(cause, seen));
} else {
return stack;
}
};
/**
* @param {Error} err
* @returns {string}
*/
const stackWithCauses = (err) => _stackWithCauses(err, new Set()); // linemod-prefix-with: export
/**
* Internal method that keeps a track of which error we have already added, to avoid circular recursion
*
* @private
* @param {Error} err
* @param {Set<Error>} seen
* @param {boolean} [skip]
* @returns {string}
*/
const _messageWithCauses = (err, seen, skip) => {
if (!(err instanceof Error)) return '';
const message = skip ? '' : (err.message || '');
// Ensure we don't go circular or crazily deep
if (seen.has(err)) {
return message + ': ...';
}
const cause = getErrorCause(err);
if (cause) {
seen.add(err);
const skipIfVErrorStyleCause = 'cause' in err && typeof err.cause === 'function';
return (message +
(skipIfVErrorStyleCause ? '' : ': ') +
_messageWithCauses(cause, seen, skipIfVErrorStyleCause));
} else {
return message;
}
};
/**
* @param {Error} err
* @returns {string}
*/
const messageWithCauses = (err) => _messageWithCauses(err, new Set()); // linemod-prefix-with: export
module.exports = { // linemod-remove
findCauseByReference, // linemod-remove
getErrorCause, // linemod-remove
stackWithCauses, // linemod-remove
messageWithCauses, // linemod-remove
}; // linemod-remove
/***/ }),
/***/ 5168:
@@ -9161,7 +9400,7 @@ module.exports = (number, options) => {
/***/ }),
/***/ 8341:
/***/ 5952:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
var once = __nccwpck_require__(1223)
@@ -9253,7 +9492,7 @@ module.exports = pump
/***/ 212:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
var pump = __nccwpck_require__(8341)
var pump = __nccwpck_require__(5952)
var inherits = __nccwpck_require__(4124)
var Duplexify = __nccwpck_require__(6599)
@@ -9318,9 +9557,19 @@ module.exports.ctor = define
/***/ }),
/***/ 5322:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
module.exports = (typeof process !== 'undefined' && typeof process.nextTick === 'function')
? process.nextTick.bind(process)
: __nccwpck_require__(1031)
/***/ }),
/***/ 1031:
/***/ ((module) => {
module.exports = process.nextTick.bind(process)
module.exports = typeof queueMicrotask === 'function' ? queueMicrotask : (fn) => Promise.resolve().then(fn)
/***/ }),
@@ -12713,6 +12962,13 @@ const READ_DONE = 0b0010000000000 << 3
const READ_NEXT_TICK = 0b0100000000001 << 3 // also active
const READ_NEEDS_PUSH = 0b1000000000000 << 3
// Combined read state
const READ_FLOWING = READ_RESUMED | READ_PIPE_DRAINED
const READ_ACTIVE_AND_SYNC = READ_ACTIVE | READ_SYNC
const READ_ACTIVE_AND_SYNC_AND_NEEDS_PUSH = READ_ACTIVE | READ_SYNC | READ_NEEDS_PUSH
const READ_PRIMARY_AND_ACTIVE = READ_PRIMARY | READ_ACTIVE
const READ_EMIT_READABLE_AND_QUEUED = READ_EMIT_READABLE | READ_QUEUED
const READ_NOT_ACTIVE = MAX ^ READ_ACTIVE
const READ_NON_PRIMARY = MAX ^ READ_PRIMARY
const READ_NON_PRIMARY_AND_PUSHED = MAX ^ (READ_PRIMARY | READ_NEEDS_PUSH)
@@ -12721,7 +12977,7 @@ const READ_PUSHED = MAX ^ READ_NEEDS_PUSH
const READ_PAUSED = MAX ^ READ_RESUMED
const READ_NOT_QUEUED = MAX ^ (READ_QUEUED | READ_EMITTED_READABLE)
const READ_NOT_ENDING = MAX ^ READ_ENDING
const READ_PIPE_NOT_DRAINED = MAX ^ (READ_RESUMED | READ_PIPE_DRAINED)
const READ_PIPE_NOT_DRAINED = MAX ^ READ_FLOWING
const READ_NOT_NEXT_TICK = MAX ^ READ_NEXT_TICK
// Write state
@@ -12751,19 +13007,14 @@ const DESTROY_STATUS = DESTROYING | DESTROYED
const OPEN_STATUS = DESTROY_STATUS | OPENING
const AUTO_DESTROY = DESTROY_STATUS | DONE
const NON_PRIMARY = WRITE_NON_PRIMARY & READ_NON_PRIMARY
const TICKING = (WRITE_NEXT_TICK | READ_NEXT_TICK) & NOT_ACTIVE
const ACTIVE_OR_TICKING = ACTIVE | TICKING
const ACTIVE_OR_TICKING = WRITE_NEXT_TICK | READ_NEXT_TICK
const TICKING = ACTIVE_OR_TICKING & NOT_ACTIVE
const IS_OPENING = OPEN_STATUS | TICKING
// Combined read state
// Combined shared state and read state
const READ_PRIMARY_STATUS = OPEN_STATUS | READ_ENDING | READ_DONE
const READ_STATUS = OPEN_STATUS | READ_DONE | READ_QUEUED
const READ_FLOWING = READ_RESUMED | READ_PIPE_DRAINED
const READ_ACTIVE_AND_SYNC = READ_ACTIVE | READ_SYNC
const READ_ACTIVE_AND_SYNC_AND_NEEDS_PUSH = READ_ACTIVE | READ_SYNC | READ_NEEDS_PUSH
const READ_PRIMARY_AND_ACTIVE = READ_PRIMARY | READ_ACTIVE
const READ_ENDING_STATUS = OPEN_STATUS | READ_ENDING | READ_QUEUED
const READ_EMIT_READABLE_AND_QUEUED = READ_EMIT_READABLE | READ_QUEUED
const READ_READABLE_STATUS = OPEN_STATUS | READ_EMIT_READABLE | READ_QUEUED | READ_EMITTED_READABLE
const SHOULD_NOT_READ = OPEN_STATUS | READ_ACTIVE | READ_ENDING | READ_DONE | READ_NEEDS_PUSH
const READ_BACKPRESSURE_STATUS = DESTROY_STATUS | READ_ENDING | READ_DONE
@@ -13640,6 +13891,10 @@ function isStreamx (stream) {
return typeof stream._duplexState === 'number' && isStream(stream)
}
function getStreamError (stream) {
return (stream._readableState && stream._readableState.error) || (stream._writableState && stream._writableState.error)
}
function isReadStreamx (stream) {
return isStreamx(stream) && stream.readable
}
@@ -13663,6 +13918,7 @@ module.exports = {
pipelinePromise,
isStream,
isStreamx,
getStreamError,
Stream,
Writable,
Readable,
@@ -17293,7 +17549,7 @@ Object.defineProperty(exports, '__esModule', {value: true}).default = assert
/***/ ((module) => {
"use strict";
module.exports = JSON.parse('{"name":"async-neocities","description":"WIP - nothing to see here","version":"2.1.2","author":"Bret Comnes <bcomnes@gmail.com> (https://bret.io)","bugs":{"url":"https://github.com/bcomnes/async-neocities/issues"},"dependencies":{"async-folder-walker":"^2.0.1","fetch-errors":"^2.0.1","form-data":"^4.0.0","lodash.chunk":"^4.2.0","nanoassert":"^2.0.0","node-fetch":"^2.6.0","pretty-bytes":"^5.3.0","pump":"^3.0.0","pumpify":"^2.0.1","streamx":"^2.6.0"},"devDependencies":{"auto-changelog":"^2.2.0","dependency-check":"^4.1.0","gh-release":"^6.0.0","minimatch":"^5.0.0","npm-run-all":"^4.1.5","standard":"^17.0.0","tap":"^16.0.0"},"homepage":"https://github.com/bcomnes/async-neocities","keywords":["neocities","async","api client","static hosting"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/bcomnes/async-neocities.git"},"scripts":{"prepublishOnly":"git push --follow-tags && gh-release -y","test":"run-s test:*","test:deps":"dependency-check . --no-dev --no-peer","test:standard":"standard","test:tape":"tap --no-check-coverage","version":"auto-changelog -p --template keepachangelog auto-changelog --breaking-pattern \'BREAKING CHANGE:\' && git add CHANGELOG.md"},"standard":{"ignore":["dist"]}}');
module.exports = JSON.parse('{"name":"async-neocities","description":"WIP - nothing to see here","version":"2.1.4","author":"Bret Comnes <bcomnes@gmail.com> (https://bret.io)","bugs":{"url":"https://github.com/bcomnes/async-neocities/issues"},"dependencies":{"async-folder-walker":"^2.0.1","fetch-errors":"^2.0.1","form-data":"^4.0.0","lodash.chunk":"^4.2.0","nanoassert":"^2.0.0","node-fetch":"^2.6.0","pony-cause":"^2.1.4","pretty-bytes":"^5.3.0","pump":"^3.0.0","pumpify":"^2.0.1","streamx":"^2.6.0"},"devDependencies":{"auto-changelog":"^2.2.0","dependency-check":"^4.1.0","gh-release":"^6.0.0","minimatch":"^5.0.0","npm-run-all":"^4.1.5","standard":"^17.0.0","tap":"^16.0.0"},"homepage":"https://github.com/bcomnes/async-neocities","keywords":["neocities","async","api client","static hosting"],"license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/bcomnes/async-neocities.git"},"scripts":{"prepublishOnly":"git push --follow-tags && gh-release -y","test":"run-s test:*","test:deps":"dependency-check . --no-dev --no-peer","test:standard":"standard","test:tape":"tap --no-check-coverage","version":"auto-changelog -p --template keepachangelog auto-changelog --breaking-pattern \'BREAKING CHANGE:\' && git add CHANGELOG.md"},"standard":{"ignore":["dist"]}}');
/***/ }),
@@ -17362,6 +17618,7 @@ const ms = __nccwpck_require__(900)
const assert = (__nccwpck_require__(3094)["default"])
const fsp = (__nccwpck_require__(7147).promises)
const minimatch = __nccwpck_require__(3973)
const { stackWithCauses } = __nccwpck_require__(702)
let cleanup
@@ -17397,7 +17654,7 @@ async function doDeploy () {
}
doDeploy().catch(err => {
console.error(err)
console.error(stackWithCauses(err))
if (err.stats) {
console.log('Files to upload: ')
console.dir(err.stats.filesToUpload, { colors: true, depth: 999 })

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@@ -6,6 +6,7 @@ const ms = require('ms')
const assert = require('webassert').default
const fsp = require('fs').promises
const minimatch = require('minimatch')
const { stackWithCauses } = require('pony-cause')
let cleanup
@@ -41,7 +42,7 @@ async function doDeploy () {
}
doDeploy().catch(err => {
console.error(err)
console.error(stackWithCauses(err))
if (err.stats) {
console.log('Files to upload: ')
console.dir(err.stats.filesToUpload, { colors: true, depth: 999 })

View File

@@ -1,25 +1,26 @@
{
"name": "deploy-to-neocities",
"description": "Github Action to deplpoy a folder to Neocities.org",
"version": "1.1.9",
"version": "1.1.12",
"author": "Bret Comnes <bcomnes@gmail.com> (https://bret.io/)",
"bugs": {
"url": "https://github.com/bcomnes/deploy-to-neocities/issues"
},
"dependencies": {
"@actions/core": "1.9.1",
"async-neocities": "2.1.2",
"minimatch": "5.1.0",
"@actions/core": "1.10.0",
"async-neocities": "2.1.4",
"minimatch": "5.1.1",
"ms": "2.1.3",
"pony-cause": "^2.1.4",
"webassert": "3.0.2"
},
"devDependencies": {
"@siteup/cli": "^2.0.0",
"@vercel/ncc": "^0.34.0",
"@vercel/ncc": "^0.36.0",
"auto-changelog": "^2.0.0",
"browser-sync": "^2.27.7",
"dependency-check": "^4.1.0",
"gh-release": "^6.0.0",
"gh-release": "^7.0.0",
"mkdirp": "^1.0.4",
"npm-run-all2": "^6.0.0",
"standard": "^17.0.0"