@rigkit/fragments 0.2.9 → 0.2.11

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rigkit contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@rigkit/fragments",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
+ "license": "MIT",
4
5
  "type": "module",
5
6
  "repository": {
6
7
  "type": "git",
@@ -16,8 +17,8 @@
16
17
  "README.md"
17
18
  ],
18
19
  "dependencies": {
19
- "@rigkit/provider-freestyle": "0.2.9",
20
- "@rigkit/sdk": "0.2.9"
20
+ "@rigkit/provider-freestyle": "0.2.11",
21
+ "@rigkit/sdk": "0.2.11"
21
22
  },
22
23
  "devDependencies": {
23
24
  "@types/bun": "latest",
@@ -1,4 +1,5 @@
1
1
  import {
2
+ VmBaseImage,
2
3
  VmSpec,
3
4
  type FreestyleProviderDefinition,
4
5
  type FreestyleTerminalProviderDefinition,
@@ -341,17 +342,21 @@ function freestyleCompanyBaseAuthCheckFragment<Context extends FreestyleCompanyB
341
342
 
342
343
  function createVmSpec(config: FreestyleCompanyBaseFragmentConfig): VmSpec {
343
344
  return new VmSpec()
344
- .runCommands(installToolingCommand(config))
345
+ .baseImage(
346
+ new VmBaseImage(`FROM node:${config.nodeMajor}`).runCommands(
347
+ installToolingCommand(config),
348
+ ),
349
+ )
345
350
  .memSizeGb(config.vm.memSizeGb)
346
351
  .vcpuCount(config.vm.vcpuCount)
347
352
  .rootfsSizeGb(config.vm.rootfsSizeGb)
348
- .idleTimeoutSeconds(config.vm.idleTimeoutSeconds);
353
+ .idleTimeoutSeconds(config.vm.idleTimeoutSeconds)
354
+ .snapshot();
349
355
  }
350
356
 
351
357
  function installToolingCommand(config: FreestyleCompanyBaseFragmentConfig): string {
352
358
  const aptPackages = [...config.systemPackages];
353
359
  if (config.github && !aptPackages.includes("gh")) aptPackages.push("gh");
354
- if (!aptPackages.includes("nodejs")) aptPackages.push("nodejs");
355
360
 
356
361
  const lines = [
357
362
  "set -e",
@@ -371,7 +376,7 @@ function installToolingCommand(config: FreestyleCompanyBaseFragmentConfig): stri
371
376
  }
372
377
 
373
378
  lines.push(
374
- `curl -fsSL https://deb.nodesource.com/setup_${config.nodeMajor}.x | bash -`,
379
+ "apt-get update -qq",
375
380
  `apt-get install -y -qq ${aptPackages.map(shellQuote).join(" ")}`,
376
381
  "corepack enable || true",
377
382
  "npm config set prefix /usr/local",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const RIGKIT_FRAGMENTS_VERSION = "0.2.9";
1
+ export const RIGKIT_FRAGMENTS_VERSION = "0.2.11";