mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-04-28 23:10:37 +08:00
Merge gitea/act into act/
Merges the `gitea.com/gitea/act` fork into this repository as the `act/` directory and consumes it as a local package. The `replace github.com/nektos/act => gitea.com/gitea/act` directive is removed; act's dependencies are merged into the root `go.mod`. - Imports rewritten: `github.com/nektos/act/pkg/...` → `gitea.com/gitea/act_runner/act/...` (flattened — `pkg/` boundary dropped to match the layout forgejo-runner adopted). - Dropped act's CLI (`cmd/`, `main.go`) and all upstream project files; kept the library tree + `LICENSE`. - Added `// Copyright <year> The Gitea Authors ...` / `// Copyright <year> nektos` headers to 104 `.go` files. - Pre-existing act lint violations annotated inline with `//nolint:<linter> // pre-existing issue from nektos/act`. `.golangci.yml` is unchanged vs `main`. - Makefile test target: `-race -short` (matches forgejo-runner). - Pre-existing integration test failures fixed: race in parallel executor (atomic counters); TestSetupEnv / command_test / expression_test / run_context_test updated to match gitea fork runtime; TestJobExecutor and TestActionCache gated on `testing.Short()`. Full `gitea/act` commit history is reachable via the second parent. Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
This commit is contained in:
21
act/runner/testdata/actions/node20/node_modules/whatwg-url/LICENSE.txt
generated
vendored
Normal file
21
act/runner/testdata/actions/node20/node_modules/whatwg-url/LICENSE.txt
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015–2016 Sebastian Mayr
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
200
act/runner/testdata/actions/node20/node_modules/whatwg-url/lib/URL-impl.js
generated
vendored
Normal file
200
act/runner/testdata/actions/node20/node_modules/whatwg-url/lib/URL-impl.js
generated
vendored
Normal file
@@ -0,0 +1,200 @@
|
||||
"use strict";
|
||||
const usm = require("./url-state-machine");
|
||||
|
||||
exports.implementation = class URLImpl {
|
||||
constructor(constructorArgs) {
|
||||
const url = constructorArgs[0];
|
||||
const base = constructorArgs[1];
|
||||
|
||||
let parsedBase = null;
|
||||
if (base !== undefined) {
|
||||
parsedBase = usm.basicURLParse(base);
|
||||
if (parsedBase === "failure") {
|
||||
throw new TypeError("Invalid base URL");
|
||||
}
|
||||
}
|
||||
|
||||
const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });
|
||||
if (parsedURL === "failure") {
|
||||
throw new TypeError("Invalid URL");
|
||||
}
|
||||
|
||||
this._url = parsedURL;
|
||||
|
||||
// TODO: query stuff
|
||||
}
|
||||
|
||||
get href() {
|
||||
return usm.serializeURL(this._url);
|
||||
}
|
||||
|
||||
set href(v) {
|
||||
const parsedURL = usm.basicURLParse(v);
|
||||
if (parsedURL === "failure") {
|
||||
throw new TypeError("Invalid URL");
|
||||
}
|
||||
|
||||
this._url = parsedURL;
|
||||
}
|
||||
|
||||
get origin() {
|
||||
return usm.serializeURLOrigin(this._url);
|
||||
}
|
||||
|
||||
get protocol() {
|
||||
return this._url.scheme + ":";
|
||||
}
|
||||
|
||||
set protocol(v) {
|
||||
usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" });
|
||||
}
|
||||
|
||||
get username() {
|
||||
return this._url.username;
|
||||
}
|
||||
|
||||
set username(v) {
|
||||
if (usm.cannotHaveAUsernamePasswordPort(this._url)) {
|
||||
return;
|
||||
}
|
||||
|
||||
usm.setTheUsername(this._url, v);
|
||||
}
|
||||
|
||||
get password() {
|
||||
return this._url.password;
|
||||
}
|
||||
|
||||
set password(v) {
|
||||
if (usm.cannotHaveAUsernamePasswordPort(this._url)) {
|
||||
return;
|
||||
}
|
||||
|
||||
usm.setThePassword(this._url, v);
|
||||
}
|
||||
|
||||
get host() {
|
||||
const url = this._url;
|
||||
|
||||
if (url.host === null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (url.port === null) {
|
||||
return usm.serializeHost(url.host);
|
||||
}
|
||||
|
||||
return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port);
|
||||
}
|
||||
|
||||
set host(v) {
|
||||
if (this._url.cannotBeABaseURL) {
|
||||
return;
|
||||
}
|
||||
|
||||
usm.basicURLParse(v, { url: this._url, stateOverride: "host" });
|
||||
}
|
||||
|
||||
get hostname() {
|
||||
if (this._url.host === null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return usm.serializeHost(this._url.host);
|
||||
}
|
||||
|
||||
set hostname(v) {
|
||||
if (this._url.cannotBeABaseURL) {
|
||||
return;
|
||||
}
|
||||
|
||||
usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" });
|
||||
}
|
||||
|
||||
get port() {
|
||||
if (this._url.port === null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return usm.serializeInteger(this._url.port);
|
||||
}
|
||||
|
||||
set port(v) {
|
||||
if (usm.cannotHaveAUsernamePasswordPort(this._url)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (v === "") {
|
||||
this._url.port = null;
|
||||
} else {
|
||||
usm.basicURLParse(v, { url: this._url, stateOverride: "port" });
|
||||
}
|
||||
}
|
||||
|
||||
get pathname() {
|
||||
if (this._url.cannotBeABaseURL) {
|
||||
return this._url.path[0];
|
||||
}
|
||||
|
||||
if (this._url.path.length === 0) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "/" + this._url.path.join("/");
|
||||
}
|
||||
|
||||
set pathname(v) {
|
||||
if (this._url.cannotBeABaseURL) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._url.path = [];
|
||||
usm.basicURLParse(v, { url: this._url, stateOverride: "path start" });
|
||||
}
|
||||
|
||||
get search() {
|
||||
if (this._url.query === null || this._url.query === "") {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "?" + this._url.query;
|
||||
}
|
||||
|
||||
set search(v) {
|
||||
// TODO: query stuff
|
||||
|
||||
const url = this._url;
|
||||
|
||||
if (v === "") {
|
||||
url.query = null;
|
||||
return;
|
||||
}
|
||||
|
||||
const input = v[0] === "?" ? v.substring(1) : v;
|
||||
url.query = "";
|
||||
usm.basicURLParse(input, { url, stateOverride: "query" });
|
||||
}
|
||||
|
||||
get hash() {
|
||||
if (this._url.fragment === null || this._url.fragment === "") {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "#" + this._url.fragment;
|
||||
}
|
||||
|
||||
set hash(v) {
|
||||
if (v === "") {
|
||||
this._url.fragment = null;
|
||||
return;
|
||||
}
|
||||
|
||||
const input = v[0] === "#" ? v.substring(1) : v;
|
||||
this._url.fragment = "";
|
||||
usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" });
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
return this.href;
|
||||
}
|
||||
};
|
||||
196
act/runner/testdata/actions/node20/node_modules/whatwg-url/lib/URL.js
generated
vendored
Normal file
196
act/runner/testdata/actions/node20/node_modules/whatwg-url/lib/URL.js
generated
vendored
Normal file
@@ -0,0 +1,196 @@
|
||||
"use strict";
|
||||
|
||||
const conversions = require("webidl-conversions");
|
||||
const utils = require("./utils.js");
|
||||
const Impl = require(".//URL-impl.js");
|
||||
|
||||
const impl = utils.implSymbol;
|
||||
|
||||
function URL(url) {
|
||||
if (!this || this[impl] || !(this instanceof URL)) {
|
||||
throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");
|
||||
}
|
||||
if (arguments.length < 1) {
|
||||
throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present.");
|
||||
}
|
||||
const args = [];
|
||||
for (let i = 0; i < arguments.length && i < 2; ++i) {
|
||||
args[i] = arguments[i];
|
||||
}
|
||||
args[0] = conversions["USVString"](args[0]);
|
||||
if (args[1] !== undefined) {
|
||||
args[1] = conversions["USVString"](args[1]);
|
||||
}
|
||||
|
||||
module.exports.setup(this, args);
|
||||
}
|
||||
|
||||
URL.prototype.toJSON = function toJSON() {
|
||||
if (!this || !module.exports.is(this)) {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
const args = [];
|
||||
for (let i = 0; i < arguments.length && i < 0; ++i) {
|
||||
args[i] = arguments[i];
|
||||
}
|
||||
return this[impl].toJSON.apply(this[impl], args);
|
||||
};
|
||||
Object.defineProperty(URL.prototype, "href", {
|
||||
get() {
|
||||
return this[impl].href;
|
||||
},
|
||||
set(V) {
|
||||
V = conversions["USVString"](V);
|
||||
this[impl].href = V;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
URL.prototype.toString = function () {
|
||||
if (!this || !module.exports.is(this)) {
|
||||
throw new TypeError("Illegal invocation");
|
||||
}
|
||||
return this.href;
|
||||
};
|
||||
|
||||
Object.defineProperty(URL.prototype, "origin", {
|
||||
get() {
|
||||
return this[impl].origin;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
Object.defineProperty(URL.prototype, "protocol", {
|
||||
get() {
|
||||
return this[impl].protocol;
|
||||
},
|
||||
set(V) {
|
||||
V = conversions["USVString"](V);
|
||||
this[impl].protocol = V;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
Object.defineProperty(URL.prototype, "username", {
|
||||
get() {
|
||||
return this[impl].username;
|
||||
},
|
||||
set(V) {
|
||||
V = conversions["USVString"](V);
|
||||
this[impl].username = V;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
Object.defineProperty(URL.prototype, "password", {
|
||||
get() {
|
||||
return this[impl].password;
|
||||
},
|
||||
set(V) {
|
||||
V = conversions["USVString"](V);
|
||||
this[impl].password = V;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
Object.defineProperty(URL.prototype, "host", {
|
||||
get() {
|
||||
return this[impl].host;
|
||||
},
|
||||
set(V) {
|
||||
V = conversions["USVString"](V);
|
||||
this[impl].host = V;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
Object.defineProperty(URL.prototype, "hostname", {
|
||||
get() {
|
||||
return this[impl].hostname;
|
||||
},
|
||||
set(V) {
|
||||
V = conversions["USVString"](V);
|
||||
this[impl].hostname = V;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
Object.defineProperty(URL.prototype, "port", {
|
||||
get() {
|
||||
return this[impl].port;
|
||||
},
|
||||
set(V) {
|
||||
V = conversions["USVString"](V);
|
||||
this[impl].port = V;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
Object.defineProperty(URL.prototype, "pathname", {
|
||||
get() {
|
||||
return this[impl].pathname;
|
||||
},
|
||||
set(V) {
|
||||
V = conversions["USVString"](V);
|
||||
this[impl].pathname = V;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
Object.defineProperty(URL.prototype, "search", {
|
||||
get() {
|
||||
return this[impl].search;
|
||||
},
|
||||
set(V) {
|
||||
V = conversions["USVString"](V);
|
||||
this[impl].search = V;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
Object.defineProperty(URL.prototype, "hash", {
|
||||
get() {
|
||||
return this[impl].hash;
|
||||
},
|
||||
set(V) {
|
||||
V = conversions["USVString"](V);
|
||||
this[impl].hash = V;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
|
||||
module.exports = {
|
||||
is(obj) {
|
||||
return !!obj && obj[impl] instanceof Impl.implementation;
|
||||
},
|
||||
create(constructorArgs, privateData) {
|
||||
let obj = Object.create(URL.prototype);
|
||||
this.setup(obj, constructorArgs, privateData);
|
||||
return obj;
|
||||
},
|
||||
setup(obj, constructorArgs, privateData) {
|
||||
if (!privateData) privateData = {};
|
||||
privateData.wrapper = obj;
|
||||
|
||||
obj[impl] = new Impl.implementation(constructorArgs, privateData);
|
||||
obj[impl][utils.wrapperSymbol] = obj;
|
||||
},
|
||||
interface: URL,
|
||||
expose: {
|
||||
Window: { URL: URL },
|
||||
Worker: { URL: URL }
|
||||
}
|
||||
};
|
||||
|
||||
11
act/runner/testdata/actions/node20/node_modules/whatwg-url/lib/public-api.js
generated
vendored
Normal file
11
act/runner/testdata/actions/node20/node_modules/whatwg-url/lib/public-api.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
exports.URL = require("./URL").interface;
|
||||
exports.serializeURL = require("./url-state-machine").serializeURL;
|
||||
exports.serializeURLOrigin = require("./url-state-machine").serializeURLOrigin;
|
||||
exports.basicURLParse = require("./url-state-machine").basicURLParse;
|
||||
exports.setTheUsername = require("./url-state-machine").setTheUsername;
|
||||
exports.setThePassword = require("./url-state-machine").setThePassword;
|
||||
exports.serializeHost = require("./url-state-machine").serializeHost;
|
||||
exports.serializeInteger = require("./url-state-machine").serializeInteger;
|
||||
exports.parseURL = require("./url-state-machine").parseURL;
|
||||
1297
act/runner/testdata/actions/node20/node_modules/whatwg-url/lib/url-state-machine.js
generated
vendored
Normal file
1297
act/runner/testdata/actions/node20/node_modules/whatwg-url/lib/url-state-machine.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
20
act/runner/testdata/actions/node20/node_modules/whatwg-url/lib/utils.js
generated
vendored
Normal file
20
act/runner/testdata/actions/node20/node_modules/whatwg-url/lib/utils.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
module.exports.mixin = function mixin(target, source) {
|
||||
const keys = Object.getOwnPropertyNames(source);
|
||||
for (let i = 0; i < keys.length; ++i) {
|
||||
Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));
|
||||
}
|
||||
};
|
||||
|
||||
module.exports.wrapperSymbol = Symbol("wrapper");
|
||||
module.exports.implSymbol = Symbol("impl");
|
||||
|
||||
module.exports.wrapperForImpl = function (impl) {
|
||||
return impl[module.exports.wrapperSymbol];
|
||||
};
|
||||
|
||||
module.exports.implForWrapper = function (wrapper) {
|
||||
return wrapper[module.exports.implSymbol];
|
||||
};
|
||||
|
||||
32
act/runner/testdata/actions/node20/node_modules/whatwg-url/package.json
generated
vendored
Normal file
32
act/runner/testdata/actions/node20/node_modules/whatwg-url/package.json
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "whatwg-url",
|
||||
"version": "5.0.0",
|
||||
"description": "An implementation of the WHATWG URL Standard's URL API and parsing machinery",
|
||||
"main": "lib/public-api.js",
|
||||
"files": [
|
||||
"lib/"
|
||||
],
|
||||
"author": "Sebastian Mayr <github@smayr.name>",
|
||||
"license": "MIT",
|
||||
"repository": "jsdom/whatwg-url",
|
||||
"dependencies": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^2.6.0",
|
||||
"istanbul": "~0.4.3",
|
||||
"mocha": "^2.2.4",
|
||||
"recast": "~0.10.29",
|
||||
"request": "^2.55.0",
|
||||
"webidl2js": "^3.0.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node scripts/transform.js && node scripts/convert-idl.js",
|
||||
"coverage": "istanbul cover node_modules/mocha/bin/_mocha",
|
||||
"lint": "eslint .",
|
||||
"prepublish": "npm run build",
|
||||
"pretest": "node scripts/get-latest-platform-tests.js && npm run build",
|
||||
"test": "mocha"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user