skills-layer 0.1.5 → 0.1.7
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/LICENSE +171 -6
- package/README.md +6 -3
- package/package.json +10 -3
- package/public/skills-layer-public.mjs +318 -116
- package/tests/public-cli-package.test.mjs +40 -2
|
@@ -11,6 +11,12 @@ const runtimeUrl = new URL("../public/skills-layer-public.mjs", import.meta.url)
|
|
|
11
11
|
const readmeUrl = new URL("../README.md", import.meta.url);
|
|
12
12
|
const licenseUrl = new URL("../LICENSE", import.meta.url);
|
|
13
13
|
const wrapperUrl = new URL("../scripts/skills-layer.mjs", import.meta.url);
|
|
14
|
+
const securityUrl = new URL("../SECURITY.md", import.meta.url);
|
|
15
|
+
const contributingUrl = new URL("../CONTRIBUTING.md", import.meta.url);
|
|
16
|
+
const codeOfConductUrl = new URL("../CODE_OF_CONDUCT.md", import.meta.url);
|
|
17
|
+
const dependabotUrl = new URL("../.github/dependabot.yml", import.meta.url);
|
|
18
|
+
const ciWorkflowUrl = new URL("../.github/workflows/ci.yml", import.meta.url);
|
|
19
|
+
const trustedPublishWorkflowUrl = new URL("../.github/workflows/publish.yml", import.meta.url);
|
|
14
20
|
const binPath = fileURLToPath(new URL("../bin/skills-layer.js", import.meta.url));
|
|
15
21
|
|
|
16
22
|
async function loadRuntime() {
|
|
@@ -74,8 +80,12 @@ test("public package metadata keeps the npm tree narrow and non-lifecycle", asyn
|
|
|
74
80
|
assert.equal(packageJson.bin["skills-layer"], "bin/skills-layer.js");
|
|
75
81
|
assert.equal(packageJson.dependencies, undefined);
|
|
76
82
|
assert.equal(packageJson.devDependencies, undefined);
|
|
77
|
-
assert.equal(packageJson.
|
|
78
|
-
assert.
|
|
83
|
+
assert.equal(packageJson.license, "Apache-2.0");
|
|
84
|
+
assert.deepEqual(packageJson.repository, {
|
|
85
|
+
type: "git",
|
|
86
|
+
url: "git+https://github.com/ankurdhoom/skills-layer.git"
|
|
87
|
+
});
|
|
88
|
+
assert.deepEqual(packageJson.bugs, { url: "https://github.com/ankurdhoom/skills-layer/issues" });
|
|
79
89
|
assert.deepEqual(packageJson.files, [
|
|
80
90
|
"bin/skills-layer.js",
|
|
81
91
|
"public/skills-layer-public.mjs",
|
|
@@ -87,6 +97,31 @@ test("public package metadata keeps the npm tree narrow and non-lifecycle", asyn
|
|
|
87
97
|
for (const lifecycleScript of ["preinstall", "install", "postinstall", "prepare", "prepack", "postpack", "prepublishOnly"]) {
|
|
88
98
|
assert.equal(packageJson.scripts[lifecycleScript], undefined);
|
|
89
99
|
}
|
|
100
|
+
|
|
101
|
+
const workflow = await readFile(trustedPublishWorkflowUrl, "utf8");
|
|
102
|
+
assert.match(workflow, /name: Publish skills-layer to npm/u);
|
|
103
|
+
assert.match(workflow, /id-token: write/u);
|
|
104
|
+
assert.match(workflow, /npm publish --access public --provenance/u);
|
|
105
|
+
assert.doesNotMatch(workflow, /NPM_TOKEN/u);
|
|
106
|
+
|
|
107
|
+
const ciWorkflow = await readFile(ciWorkflowUrl, "utf8");
|
|
108
|
+
assert.match(ciWorkflow, /name: CLI package CI/u);
|
|
109
|
+
assert.match(ciWorkflow, /npm run typecheck/u);
|
|
110
|
+
assert.match(ciWorkflow, /npm run test:coverage/u);
|
|
111
|
+
assert.doesNotMatch(ciWorkflow, /NPM_TOKEN/u);
|
|
112
|
+
|
|
113
|
+
const dependabot = await readFile(dependabotUrl, "utf8");
|
|
114
|
+
assert.match(dependabot, /package-ecosystem: npm/u);
|
|
115
|
+
|
|
116
|
+
const [security, contributing, codeOfConduct] = await Promise.all([
|
|
117
|
+
readFile(securityUrl, "utf8"),
|
|
118
|
+
readFile(contributingUrl, "utf8"),
|
|
119
|
+
readFile(codeOfConductUrl, "utf8")
|
|
120
|
+
]);
|
|
121
|
+
assert.match(security, /Please do not open public issues for active vulnerabilities/u);
|
|
122
|
+
assert.match(security, /hello@skills-layer\.com/u);
|
|
123
|
+
assert.match(contributing, /Do not submit backend service code/u);
|
|
124
|
+
assert.match(codeOfConduct, /Expected Behavior/u);
|
|
90
125
|
});
|
|
91
126
|
|
|
92
127
|
test("public package text stays limited to public CLI surface", async () => {
|
|
@@ -100,6 +135,9 @@ test("public package text stays limited to public CLI surface", async () => {
|
|
|
100
135
|
const combined = `${packageText}\n${readme}\n${license}\n${runtime}\n${wrapper}`;
|
|
101
136
|
assert.match(combined, /Skills Layer/u);
|
|
102
137
|
assert.match(combined, /skills-layer/u);
|
|
138
|
+
assert.match(readme, /open-source CLI, MCP setup, and local agent integration layer/u);
|
|
139
|
+
assert.match(readme, /hosted backend code, marketplace services, Guardian scoring internals, and service operations remain proprietary/u);
|
|
140
|
+
assert.match(readme, /actions\/workflows\/ci\.yml\/badge\.svg/u);
|
|
103
141
|
assert.match(readme, /https:\/\/unpkg\.com\/skills-layer\/docs\/assets\/skills-layer-logo\.svg/u);
|
|
104
142
|
assert.match(readme, /https:\/\/unpkg\.com\/skills-layer\/docs\/assets\/skills-layer-hero\.svg/u);
|
|
105
143
|
assert.match(readme, /https:\/\/unpkg\.com\/skills-layer\/docs\/assets\/skills-layer-flow\.svg/u);
|