-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from aziontech/stage
Release 1.10
- Loading branch information
Showing
48 changed files
with
1,219 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
module.exports = { | ||
displayName: 'Utils', | ||
preset: 'ts-jest', | ||
transform: { | ||
'^.+\\.(t|j)s?$': '@swc/jest', | ||
}, | ||
testPathIgnorePatterns: ['/node_modules/', '/dist/'], | ||
testEnvironment: 'node', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "@lib/presets", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"scripts": { | ||
"compile": "tsup --config ../../tsup.config.json", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint --fix .", | ||
"test": "jest --clearCache && jest -c jest.config.js .", | ||
"test:watch": "jest -c jest.config.js . --watch", | ||
"test:coverage": "jest --clearCache && jest -c jest.config.js . --coverage", | ||
"prettier": "prettier --write .", | ||
"prettier:check": "prettier --check ." | ||
}, | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.js", | ||
"import": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts" | ||
} | ||
}, | ||
"author": "aziontech", | ||
"license": "MIT", | ||
"files": [ | ||
"dist", | ||
"package.json" | ||
], | ||
"devDependencies": { | ||
"ajv": "^8.17.1", | ||
"ajv-errors": "^3.0.0", | ||
"ajv-keywords": "^5.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import Angular from './presets/angular/index'; | ||
import Astro from './presets/astro/index'; | ||
import Docusaurus from './presets/docusaurus/index'; | ||
import Eleventy from './presets/eleventy/index'; | ||
import Emscripten from './presets/emscripten/index'; | ||
import Gatsby from './presets/gatsby/index'; | ||
import Hexo from './presets/hexo/index'; | ||
import Html from './presets/html/index'; | ||
import Hugo from './presets/hugo/index'; | ||
import JavaScript from './presets/javascript/index'; | ||
import Jekyll from './presets/jekyll/index'; | ||
import Next from './presets/next/index'; | ||
import Nuxt from './presets/nuxt/index'; | ||
import React from './presets/react/index'; | ||
import RustWasm from './presets/rustwasm/index'; | ||
import Svelte from './presets/svelte/index'; | ||
import TypeScript from './presets/typescript/index'; | ||
import VitePress from './presets/vitepress/index'; | ||
import Vue from './presets/vue/index'; | ||
|
||
const presets = { | ||
Angular, | ||
Astro, | ||
Docusaurus, | ||
Eleventy, | ||
Emscripten, | ||
Gatsby, | ||
Hexo, | ||
Html, | ||
Hugo, | ||
JavaScript, | ||
Jekyll, | ||
Next, | ||
Nuxt, | ||
React, | ||
RustWasm, | ||
Svelte, | ||
TypeScript, | ||
VitePress, | ||
Vue, | ||
}; | ||
|
||
export { | ||
Angular, | ||
Astro, | ||
Docusaurus, | ||
Eleventy, | ||
Emscripten, | ||
Gatsby, | ||
Hexo, | ||
Html, | ||
Hugo, | ||
JavaScript, | ||
Jekyll, | ||
Next, | ||
Nuxt, | ||
React, | ||
RustWasm, | ||
Svelte, | ||
TypeScript, | ||
VitePress, | ||
Vue, | ||
}; | ||
|
||
export default presets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { defineConfig } from 'azion/config'; | ||
|
||
const config = defineConfig({ | ||
build: { | ||
preset: { | ||
name: 'angular', | ||
}, | ||
}, | ||
origin: [ | ||
{ | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
], | ||
|
||
rules: { | ||
request: [ | ||
{ | ||
name: 'Set Storage Origin for All Requests', | ||
match: '^\\/', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
}, | ||
}, | ||
{ | ||
name: 'Deliver Static Assets', | ||
match: '.(css|js|ttf|woff|woff2|pdf|svg|jpg|jpeg|gif|bmp|png|ico|mp4|json|xml|html)$', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
deliver: true, | ||
}, | ||
}, | ||
{ | ||
name: 'Redirect to index.html', | ||
match: '^\\/', | ||
behavior: { | ||
rewrite: `/index.html`, | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { AzionBuildPreset } from '../../types'; | ||
import config from './config'; | ||
// import handler from './handler'; | ||
// import prebuild from './prebuild'; | ||
// import postbuild from './postbuild'; | ||
|
||
const preset: AzionBuildPreset = { config }; | ||
|
||
export default preset; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { defineConfig } from 'azion/config'; | ||
|
||
const config = defineConfig({ | ||
build: { | ||
preset: { | ||
name: 'astro', | ||
}, | ||
}, | ||
origin: [ | ||
{ | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
], | ||
rules: { | ||
request: [ | ||
{ | ||
name: 'Set Storage Origin for All Requests', | ||
match: '^\\/', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
}, | ||
}, | ||
{ | ||
name: 'Deliver Static Assets', | ||
match: '.(css|js|ttf|woff|woff2|pdf|svg|jpg|jpeg|gif|bmp|png|ico|mp4|json|xml|html)$', | ||
behavior: { | ||
setOrigin: { | ||
name: 'origin-storage-default', | ||
type: 'object_storage', | ||
}, | ||
deliver: true, | ||
}, | ||
}, | ||
{ | ||
name: 'Redirect to index.html', | ||
match: '.*/$', | ||
behavior: { | ||
rewrite: '${uri}index.html', | ||
}, | ||
}, | ||
{ | ||
name: 'Redirect to index.html for Subpaths', | ||
match: '^(?!.*\\/$)(?![\\s\\S]*\\.[a-zA-Z0-9]+$).*', | ||
behavior: { | ||
rewrite: '${uri}/index.html', | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { AzionBuildPreset } from '../../types'; | ||
import config from './config'; | ||
// import handler from './handler'; | ||
// import prebuild from './prebuild'; | ||
// import postbuild from './postbuild'; | ||
|
||
const preset: AzionBuildPreset = { config }; | ||
|
||
export default preset; |
Oops, something went wrong.