@zuplo/core 6.12.0 → 6.12.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/core",
3
- "version": "6.12.0",
3
+ "version": "6.12.3",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "type": "module",
@@ -25,15 +25,11 @@
25
25
  "registry": "https://registry.npmjs.org"
26
26
  },
27
27
  "files": [
28
- "create.index.minified.js",
29
- "create.index.minified.js.LEGAL.txt",
30
28
  "customer.cli.minified.js",
31
29
  "index.d.ts",
32
30
  "index.minified.js",
33
31
  "index.minified.js.LEGAL.txt",
34
- "README.md",
35
- "templates/",
36
- "polyfills/"
32
+ "README.md"
37
33
  ],
38
34
  "dependencies": {
39
35
  "@swc/core": "^1.7.6",
@@ -44,8 +40,8 @@
44
40
  "prettier": "^3.3.3"
45
41
  },
46
42
  "peerDependencies": {
47
- "@zuplo/graphql": "^6.12.0",
48
- "@zuplo/otel": "^6.12.0",
49
- "@zuplo/runtime": "^6.12.0"
43
+ "@zuplo/graphql": "^6.12.3",
44
+ "@zuplo/otel": "^6.12.3",
45
+ "@zuplo/runtime": "^6.12.3"
50
46
  }
51
47
  }
@@ -1,34 +0,0 @@
1
-
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Zuplo, Inc. All rights reserved.
4
- *
5
- * This software and associated documentation files (the "Software") is intended to be used
6
- * only by Zuplo customers solely to develop and test applications that will be deployed
7
- * to Zuplo hosted services. You and others in your organization may use these files on your
8
- * Development Devices solely for the above stated purpose.
9
- *
10
- * Outside of uses stated above, no license is granted for any other purpose including
11
- * without limitation the rights to use, copy, modify, merge, publish, distribute,
12
- * sublicense, host, and/or sell copies of the Software.
13
- *
14
- * The software may include third party components with separate legal notices or governed by
15
- * other agreements, as described in licenses either embedded in or accompanying the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19
- * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
20
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
- * DEALINGS IN THE SOFTWARE.
23
- *--------------------------------------------------------------------------------------------*/
24
-
25
- // Needed because of https://github.com/evanw/esbuild/issues/1944
26
- import { fileURLToPath } from 'node:url';
27
- import { dirname } from 'node:path';
28
- import { createRequire as topLevelCreateRequire } from 'node:module';
29
- const require = topLevelCreateRequire(import.meta.url);
30
- const __filename = fileURLToPath(import.meta.url);
31
- const __dirname = dirname(__filename);
32
-
33
- var Fe=Object.create;var N=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var Me=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,ye=Object.prototype.hasOwnProperty;var n=(e,r)=>N(e,"name",{value:r,configurable:!0});var S=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Se=(e,r)=>{for(var o in r)N(e,o,{get:r[o],enumerable:!0})},ve=(e,r,o,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Me(r))!ye.call(e,i)&&i!==o&&N(e,i,{get:()=>r[i],enumerable:!(t=he(r,i))||t.enumerable});return e};var Ge=(e,r,o)=>(o=e!=null?Fe(we(e)):{},ve(r||!e||!e.__esModule?N(o,"default",{value:e,enumerable:!0}):o,e));var Y=S((po,B)=>{"use strict";function Ce(e){return e>=55296&&e<=56319}n(Ce,"isHighSurrogate");function Ke(e){return e>=56320&&e<=57343}n(Ke,"isLowSurrogate");B.exports=n(function(r,o,t){if(typeof o!="string")throw new Error("Input must be string");for(var i=o.length,c=0,E,_,a=0;a<i;a+=1){if(E=o.charCodeAt(a),_=o[a],Ce(E)&&Ke(o.charCodeAt(a+1))&&(a+=1,_+=o[a]),c+=r(_),c===t)return o.slice(0,a+1);if(c>t)return o.slice(0,a-_.length+1)}return o},"truncate")});var z=S((fo,b)=>{"use strict";var Xe=Y(),Ze=Buffer.byteLength.bind(Buffer);b.exports=Xe.bind(null,Ze)});var R;(function(e){e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(R||(R={}));var A=class extends Error{static{n(this,"ApiError")}type;status;detail;instance;constructor(r,o){if(super(r.title,o),!r.type.startsWith("https://zup.fail/"))throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${r.type}`);this.name="ApiProblemError",this.type=r.type,this.status=r.status,this.detail=r.detail,this.instance=r.instance}};var P={};Se(P,{UnsafePathError:()=>D,deleteFile:()=>de,deleteFolder:()=>We,dirExists:()=>u,ensureDirectoryExists:()=>Ye,fileExists:()=>je,getParentDirFilename:()=>ze,isNotFileOrDirectory:()=>Ve,listFolderContents:()=>j,listFolders:()=>Be,mkdirForFilePathIfNotExits:()=>V,mkdirIfNotExists:()=>d,safePath:()=>be,tarFolderContent:()=>Je,untar:()=>$e});import v from"child_process";import l from"fs/promises";import T from"path";var G=[".git","node_modules",".yarn",".DS_Store"];async function je(e){try{return(await l.stat(e)).isFile()}catch{return!1}}n(je,"fileExists");async function de(e,r){return await l.rm(e,r)}n(de,"deleteFile");async function u(e){try{return(await l.stat(e)).isDirectory()}catch{return!1}}n(u,"dirExists");async function Ve(e){try{return await l.stat(e),!1}catch{return!0}}n(Ve,"isNotFileOrDirectory");function ke(e,r){let o=new RegExp(`(.*)(\\/${r})$|(.*)(${r}\\/)`),t=e.match(o);if(!t)return"";let i=e.split(t[0]);return i[1]===""?"":`/${i[1]}`}n(ke,"getParentDirectory");async function Be(e){if(!await u(e))return[];let r=await l.readdir(e,{withFileTypes:!0}),o=[];for await(let t of r)G.includes(t.name)||t.isDirectory()&&o.push(t.name);return o}n(Be,"listFolders");async function j(e,r,o=!0){let t=ke(e,r),i=await l.readdir(e,{withFileTypes:!0}),c=[];for await(let E of i)if(!G.includes(E.name)||!o)if(E.isDirectory()){let _=await j(T.join(e,E.name),r,o);c.push(..._)}else c.push(T.join(t,E.name));return c}n(j,"listFolderContents");var d=n(async e=>{if(await u(e))return!0;await l.mkdir(e,{recursive:!0})},"mkdirIfNotExists"),V=n(async e=>{let r=T.dirname(e);return d(r)},"mkdirForFilePathIfNotExits"),Ye=V,D=class extends Error{static{n(this,"UnsafePathError")}constructor(r){super(r)}};function be(e){let r=n(o=>{if(!o.startsWith(e))throw new D("Resolved path is not part of the project.");return o},"ensureSafePath");return{resolve:n((...o)=>r(T.resolve(...o)),"resolve")}}n(be,"safePath");function ze(e){return`${T.basename(T.dirname(e))}/${T.basename(e)}`}n(ze,"getParentDirFilename");function Je(e,r,o,t){let i=T.join(t,o);return v.execSync(`tar --exclude='.git/' --exclude='dist/' -czf ${i} ${r}`,{cwd:e}),i}n(Je,"tarFolderContent");function $e(e,r,o,t=!1){v.execSync(`tar -xf ${r} ${t?"--strip-components=1 ":""}-C ${o}`,{cwd:e})}n($e,"untar");async function We(e){if(await u(e))return await l.rm(e,{recursive:!0})}n(We,"deleteFolder");var L=P;import{rm as Ur}from"fs/promises";import Fr from"path";var I=class extends Error{static{n(this,"BuildIssueError")}issue;pluginName;constructor(r,o){super(r.message),this.issue=r,this.pluginName=o}};var U="2024-09-02",Qe=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1,allowCustomPorts:!1},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1,allowCustomPorts:!1},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!1},"2024-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!1},"2024-09-02":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0}});var m=class{static{n(this,"PluginResult")}errors=[];warnings=[];constructor(r){r&&this.errors.push(r)}};async function k(e,r){let o=[],t=[],i=new Map;for await(let c of e)try{let E=await c(r,i);if(t.push(...E.errors.map(_=>(_.pluginName===""&&(_.pluginName=c.name),_))),o.push(...E.warnings),E.errors.length>0)break}catch(E){E instanceof I?t.push({...E.issue,pluginName:E.pluginName??"unknown"}):t.push(E);break}return{errors:t,warnings:o,data:i}}n(k,"runPlugins");var J=Ge(z(),1);var qe=/[/?<>\\:*|"]/g,He=/[\x00-\x1f\x80-\x9f]/g,er=/^\.+$/,rr=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,or=/[. ]+$/;function F(e,r=""){if(typeof e!="string")throw new Error("Input must be string");let o=e.replace(qe,r).replace(He,r).replace(er,r).replace(rr,r).replace(or,r);return(0,J.default)(o,255)}n(F,"sanitize");import re from"fs/promises";import nr from"path";var g="modules",$="tests",p="config",W="schemas";var O="docs";var Q="routes.oas.json",C="policies.json",K="dev-portal.json";var X="hello-world.ts",Z="zuplo.jsonc";var q="sidebar.json",H="theme.css";var ee="index.md";var oe=n(async function({sourceDirectory:e,logger:r}){r.debug("Creating project directories");let o=[g,p,$,W,O,".vscode"];try{await re.mkdir(e);for(let t of o)await re.mkdir(nr.join(e,t),{recursive:!0})}catch(t){return r.error(t),new m({message:`Cannot create project directory tree at ${e}`,pluginName:"create-project-dirs",severity:"error"})}return new m},"createProjectDirs");import mr from"path";import cr from"fs/promises";import ar from"path";import{performance as x,PerformanceObserver as tr}from"perf_hooks";var h=[];async function ir(e,r){let o=x.timerify(r),t=new tr(i=>{let c=i.getEntries()[0];h.push({name:e,duration:c.duration}),t.disconnect()});return t.observe({entryTypes:["function"]}),o()}n(ir,"timeFn");var sr={mark:n(e=>{x.mark(e)},"mark"),measure:n((e,r,o)=>{x.measure(e,r,o)},"measure"),timeFn:ir,report:n(()=>{h.length>0&&console.table(h)},"report"),getDuration:n(e=>{let r=x.getEntriesByName(e);return r.length===0?0:r[0].duration},"getDuration")},ne=sr;import{existsSync as Er}from"fs";import te from"fs/promises";import ie from"path";import{dirname as se}from"path";import{fileURLToPath as Ee}from"url";async function ce(e){let r=ie.resolve(se(Ee(import.meta.url)),"..","templates",e);if(Er(r))return await te.readFile(r,"utf-8");{let o=ie.resolve(se(Ee(import.meta.url)),"templates",e);return await te.readFile(o,"utf-8")}}n(ce,"generateFromTemplate");var s=n(function(e,r){return async({sourceDirectory:o,logger:t})=>ne.timeFn(`Generating ${e}`,async()=>{t.debug(`Generating ${e}`);let i=ar.join(o,e);return await L.fileExists(i)?(t.debug({sourceDirectory:o},`${e} already exists, skipping`),{warnings:[],errors:[]}):_r(i,r,t)})},"generateFileFromTemplate");async function _r(e,r,o){let t=await ce(r);try{await cr.writeFile(e,t,"utf-8"),o.debug(`File written to ${e}`)}catch(i){o.error(i);let c={message:`Error creating file at ${e}`,pluginName:"generate-file",severity:"error"};return{warnings:[],errors:[c]}}return{warnings:[],errors:[]}}n(_r,"writeTemplate");var ae=s(mr.join(O,ee),"markdown.template.md");import Tr from"path";var _e=s(Tr.join(O,q),"sidebar.template.json");import lr from"path";var me=s(lr.join(O,H),"dev-portal.theme.template.css");import pr from"path";var Te=s(pr.join(g,X),"hello-world.template.ts");import Or from"path";var le=s(Or.join(p,K),"dev-portal.template.json");var pe=s(".env","env.template");var Oe=s(".eslintrc.js","eslintrc.template.js");var fe=s(".gitignore","gitignore.template.ignore");import fr from"path";var Re=s(fr.join(".vscode","launch.json"),"launch.template.jsonc");import Rr from"path";var Ie=s(Rr.join(p,Q),"routes.oas.template.json");import Nr from"fs/promises";import Ae from"path";var M=class{static{n(this,"Environment")}get DEV_SERVER_PORT(){return process.env.DEV_SERVER_PORT?parseInt(process.env.DEV_SERVER_PORT):3e3}get DEBUG_BUILD_MODE(){return!!process.env.DEBUG_BUILD_MODE}get USE_MONOREPO_PACKAGES(){return process.env.USE_MONOREPO_PACKAGES==="true"}get EXPERIMENTAL_CODEGEN(){return!!process.env.EXPERIMENTAL_CODEGEN}get NODE_ENV(){return process.env.NODE_ENV}isProduction(){return this.NODE_ENV==="production"}isLocalDevelopment(){return process.env.ZUPLO_IS_LOCAL_DEVELOPMENT==="true"}},Ir=new M,Ne=Ir;import{dirname as Ar}from"path";import{fileURLToPath as Dr}from"url";async function De(e,r=Ne.USE_MONOREPO_PACKAGES){let o={name:e,version:"1.0.0",author:"",copyright:"",scripts:{dev:"zup dev",test:"zup test"},dependencies:{zuplo:"latest"}};if(r){let t=ur();o.overrides=t,o.dependencies["@zuplo/runtime"]=t["@zuplo/runtime"],o.devDependencies&&"@zuplo/core"in o.devDependencies&&(o.devDependencies["@zuplo/core"]=t["@zuplo/core"]),"@zuplo/core"in o.dependencies&&(o.dependencies["@zuplo/core"]=t["@zuplo/core"])}return o}n(De,"generateDefaultPackageJson");function ur(){let e=Ae.resolve(Ar(Dr(import.meta.url)),"..","..");return{"@zuplo/core":`file:${e}/core`,"@zuplo/runtime":`file:${e}/runtime`,"@zuplo/debug":`file:${e}/debug`,"@zuplo/errors":`file:${e}/errors`}}n(ur,"getPackageOverrides");async function ue(e,r){let o=Ae.join(e,"package.json"),t=JSON.stringify(r,void 0,2);await Nr.writeFile(o,t,"utf-8")}n(ue,"updateProjectPackageJson");var Le=n(async function({sourceDirectory:e,name:r,logger:o}){let t=await De(r);try{await ue(e,t)}catch(i){return o.error(i),new m({message:"Error creating package.json",pluginName:"generate-package-json",severity:"error"})}return new m},"generatePackageJson");import Lr from"path";var ge=s(Lr.join(p,C),"policies.template.json");import gr from"path";var xe=s(gr.join(".vscode","settings.json"),"settings.template.jsonc");var Pe=s("tsconfig.json","tsconfig.template.json");import{writeFile as xr}from"fs/promises";import Pr from"path";var Ue=n(async function({name:e,sourceDirectory:r,logger:o}){let t={version:1,project:e,compatibilityDate:U},i=Pr.join(r,Z),c=JSON.stringify(t,null,2);try{await xr(i,c,"utf-8")}catch(E){return o.error(E),new m({message:"Error creating zuplo.jsonc",pluginName:"generate-zuplo-json",severity:"error"})}return new m},"generateZuploJson");async function hr({name:e,accountName:r="",rootDirectory:o,logger:t}){let i=F(e),c=F(r),E=Fr.join(o,c,i),_={name:e,sourceDirectory:E,logger:t},a=[];if(await L.dirExists(E))throw new A({type:"https://zup.fail/project-already-exists-at-directory",title:"The project already exists in the specified directory",status:R.BAD_REQUEST,detail:`Project already exists at ${E}`});a.push(oe,Ie,Ue,le,Te,_e,ae,me,ge),a.push(Pe,fe,Le,pe,Oe,Re,xe);let{errors:w,warnings:y}=await k(a,_);if(y.length>0&&y.forEach(f=>{t.warn(f)}),w.length>0){await Ur(E,{recursive:!0,force:!0});let f=w[0];throw f instanceof Error?f:new Error(f.message)}return{sourceDirectory:E,projectName:e}}n(hr,"create");export{hr as create};
34
- /*! For license information please see create.index.minified.js.LEGAL.txt */
File without changes
@@ -1,8 +0,0 @@
1
- export class AsyncLocalStorage {
2
- getStore() {
3
- return {};
4
- }
5
- run(store, fn) {
6
- return fn();
7
- }
8
- }
@@ -1,5 +0,0 @@
1
- {
2
- "$schema": "https://cdn.zuplo.com/schemas/dev-portal.json",
3
- "enabled": true,
4
- "enableAuthentication": true
5
- }
@@ -1,29 +0,0 @@
1
- /* Learn about theming here: https://zuplo.com/docs/developer-portal/theme */
2
-
3
- :root {
4
- --logo-url: url(https://cdn.zuplo.com/dev-portal/v2/made-with-zuplo.svg);
5
- }
6
-
7
- .light {
8
- --background-primary: white;
9
- --font-family-primary: "-apple-system", "BlinkMacSystemFont", "Segoe UI",
10
- "Roboto", "Helvetica Neue", "Ubuntu", "sans-serif";
11
- --text-color-h1: rgb(42 47 69);
12
- --text-color-h2: rgb(42 47 69);
13
- --text-color-primary: rgb(79 86 107);
14
- }
15
-
16
- .dark {
17
- --background-primary: #1a1f36;
18
- --font-family-primary: "-apple-system", "BlinkMacSystemFont", "Segoe UI",
19
- "Roboto", "Helvetica Neue", "Ubuntu", "sans-serif";
20
- --text-color-h1: #f7fafc;
21
- --text-color-h2: #f7fafc;
22
- --text-color-primary: rgb(193 201 210);
23
- }
24
-
25
- /* The logo image */
26
- .theme-logo {
27
- content: var(--logo-url);
28
- margin: 20px;
29
- }
@@ -1,2 +0,0 @@
1
- EXAMPLE_SECRET=👀 What you looking at?
2
- EXAMPLE_CONFIG=https://twitter.com/zuplo
@@ -1,11 +0,0 @@
1
- /**@type {import('eslint').Linter.Config} */
2
- // eslint-disable-next-line no-undef
3
- module.exports = {
4
- root: true,
5
- parser: "@typescript-eslint/parser",
6
- plugins: ["@typescript-eslint", "import"],
7
- extends: ["prettier"],
8
- rules: {
9
- "no-console": "error",
10
- },
11
- };
@@ -1,32 +0,0 @@
1
- {
2
- "type": "object",
3
- "title": "Product",
4
- "required": ["name", "description", "material", "price"],
5
- "properties": {
6
- "name": {
7
- "type": "string",
8
- "default": "",
9
- "title": "The product name",
10
- "examples": ["Intelligent Metal Salad"]
11
- },
12
- "description": {
13
- "type": "string",
14
- "title": "The product description",
15
- "examples": [
16
- "The slim & simple Maple Gaming Keyboard from Dev Byte comes with a sleek body and 7-Color RGB LED Back-lighting for smart functionality"
17
- ]
18
- },
19
- "material": {
20
- "type": "string",
21
- "default": "",
22
- "title": "The material Schema",
23
- "examples": ["Maple"]
24
- },
25
- "price": {
26
- "type": "number",
27
- "default": "",
28
- "title": "The product price in USD",
29
- "examples": ["894.26"]
30
- }
31
- }
32
- }
@@ -1,10 +0,0 @@
1
- .zuplo/
2
- .cache/
3
- dist/
4
- node_modules/
5
- .env
6
- .env.zuplo
7
- .husky/_
8
-
9
- # OS Stuff
10
- .DS_Store
@@ -1,21 +0,0 @@
1
- import { ZuploContext, ZuploRequest } from "@zuplo/runtime";
2
-
3
- export default async function (request: ZuploRequest, context: ZuploContext) {
4
- /**
5
- * Use the log property on context to enjoy
6
- * logging magic when testing your API.
7
- */
8
- context.log.info(`Hi, from inside your zup!`);
9
-
10
- /**
11
- * If you want to proxy an API, you can simply
12
- * return the content of a fetch. Try it by
13
- * uncommenting the line below.
14
- */
15
- // return fetch('http://www.example.com/');
16
-
17
- /**
18
- * In this example, we're just going to return some content.
19
- */
20
- return "What zup?";
21
- }
@@ -1,37 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "type": "node",
9
- "request": "launch",
10
- "name": "Launch Zuplo",
11
- "runtimeExecutable": "npx",
12
- "runtimeArgs": [
13
- "@zuplo/cli",
14
- "dev",
15
- "--debug-port",
16
- "9229",
17
- "--port",
18
- "9000",
19
- ],
20
- "console": "integratedTerminal",
21
- "internalConsoleOptions": "neverOpen",
22
- },
23
- {
24
- "name": "Zuplo Gateway",
25
- "type": "node",
26
- "request": "attach",
27
- "restart": true,
28
- "port": 9229,
29
- },
30
- ],
31
- "compounds": [
32
- {
33
- "name": "Launch & Attach Zuplo",
34
- "configurations": ["Launch Zuplo", "Zuplo Gateway"],
35
- },
36
- ],
37
- }
@@ -1,43 +0,0 @@
1
- # My API
2
-
3
- You can write full markdown in these documents. Syntax highlighting and full
4
- Github Flavored markdown are supported. To learn more about customizing the
5
- documentation of this developer portal
6
- [see the documentation](https://zuplo.com/docs/developer-portal/adding-pages).
7
-
8
- ```ts
9
- const response = await fetch("https://echo.zuplo.io", {
10
- headers: {
11
- "content-type": "application/json",
12
- },
13
- });
14
-
15
- const data = await response.json();
16
- console.log(data);
17
- ```
18
-
19
- ## Labore et Dolore
20
-
21
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
22
- incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
23
- nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
24
- Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
25
- fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
26
- culpa qui officia deserunt mollit anim id est laborum.
27
-
28
- | Item | Description | Quanity |
29
- | --------------- | -------------------------------------------- | ------- |
30
- | ullamco laboris | reprehenderit in voluptate velit esse cillum | 21 |
31
- | Excepteur sint | tempor incididunt ut labore | 1 |
32
- | anim id est | irure dolor in reprehenderit in voluptate | 82 |
33
- | non proiden | cupidatat non proident, sunt in | 53 |
34
-
35
- ## Aliquip pariatur
36
-
37
- Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
38
- deserunt mollit anim id est laborum.
39
-
40
- - **Item 1** - ullamco laboris nisi ut aliquip ex ea commodo
41
- - **Item 2** - ullamco laboris nisi ut aliquip ex ea commodo
42
- - **Item 3** - ullamco laboris nisi ut aliquip ex ea commodo
43
- - **Item 4** - ullamco laboris nisi ut aliquip ex ea commodo
@@ -1,20 +0,0 @@
1
- {
2
- "openapi": "3.1.0",
3
- "info": {
4
- "title": "A minimal OpenAPI document",
5
- "description": "Welcome to your API documentation. Learn more about setting up a documentation portal here: [https://docs.zuplo.com/articles/developer-portal](https://docs.zuplo.com/articles/developer-portal)",
6
- "version": "0.0.1"
7
- },
8
- "paths": {
9
- "/v1/hello-world": {
10
- "get": {
11
- "summary": "Summary of the GET operation",
12
- "description": "Description of the GET operation. Supports [CommonMark](https://spec.commonmark.org/0.30/)"
13
- },
14
- "post": {
15
- "summary": "Summary of the POST operation",
16
- "description": "Description"
17
- }
18
- }
19
- }
20
- }
@@ -1,3 +0,0 @@
1
- {
2
- "policies": []
3
- }
@@ -1,8 +0,0 @@
1
- {
2
- "openapi": "3.1.0",
3
- "info": {
4
- "version": "1.0.0",
5
- "title": "My Zuplo API"
6
- },
7
- "paths": {}
8
- }
@@ -1,5 +0,0 @@
1
- {
2
- "$schema": "https://cdn.zuplo.com/schemas/routes.json",
3
- "routes": [],
4
- "policies": []
5
- }
@@ -1,24 +0,0 @@
1
- {
2
- "json.schemas": [
3
- {
4
- "fileMatch": ["config/*.oas.json"],
5
- "url": "https://cdn.zuplo.com/schemas/openapi-v3.1-zuplo.json",
6
- },
7
- {
8
- "fileMatch": ["config/policies.json"],
9
- "url": "https://cdn.zuplo.com/schemas/policies.json",
10
- },
11
- {
12
- "fileMatch": ["config/dev-portal.json"],
13
- "url": "https://cdn.zuplo.com/schemas/dev-portal.json",
14
- },
15
- {
16
- "fileMatch": ["docs/sidebar.json"],
17
- "url": "https://cdn.zuplo.com/schemas/sidebar.json",
18
- },
19
- {
20
- "fileMatch": ["config/routes.json"],
21
- "url": "https://cdn.zuplo.com/schemas/routes.json",
22
- },
23
- ],
24
- }
@@ -1,13 +0,0 @@
1
- {
2
- "docs": [
3
- {
4
- "type": "doc",
5
- "id": "index",
6
- "label": "Index"
7
- },
8
- {
9
- "type": "api-ref",
10
- "label": "API Reference"
11
- }
12
- ]
13
- }
@@ -1,18 +0,0 @@
1
- {
2
- "include": ["modules/**/*", ".zuplo/**/*", "tests/**/*"],
3
- "exclude": ["./node_modules", "./dist"],
4
- "compilerOptions": {
5
- "module": "ESNext",
6
- "target": "ES2022",
7
- "moduleResolution": "Bundler",
8
- "lib": ["ESNext", "WebWorker", "Webworker.Iterable"],
9
- "preserveConstEnums": true,
10
- "useUnknownInCatchVariables": false,
11
- "forceConsistentCasingInFileNames": true,
12
- "importHelpers": true,
13
- "removeComments": true,
14
- "esModuleInterop": true,
15
- "strictNullChecks": true,
16
- "noEmit": true
17
- }
18
- }