pulumi-package-docs 0.9.0 → 0.9.1
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/bin/args.js +8 -0
- package/bin/args.test.js +11 -1
- package/bin/cli-bun.js +2 -2
- package/dist/client/assets/MemberDetail-Du4HYTda.js +1 -0
- package/dist/client/assets/index-g58gbZKl.js +12 -0
- package/dist/client/assets/matchContext-BfDTxnb0.js +2 -0
- package/dist/client/assets/providers._name-DztqmroK.js +1 -0
- package/dist/client/assets/providers._name.functions._token-Dds2hD5R.js +1 -0
- package/dist/client/assets/providers._name.functions._token-DkZe4R_v.js +1 -0
- package/dist/client/assets/providers._name.index-B6cK3ZCZ.js +1 -0
- package/dist/client/assets/providers._name.index-CvFTUtAs.js +1 -0
- package/dist/client/assets/providers._name.resources._token-Bf7TPYcB.js +1 -0
- package/dist/client/assets/providers._name.resources._token-CIjv9yb8.js +1 -0
- package/dist/client/assets/routes-Dz3Kksbm.js +1 -0
- package/dist/server/assets/{_tanstack-start-manifest_v-DNIp6gp3.js → _tanstack-start-manifest_v-Drm3Ru6D.js} +15 -13
- package/dist/server/server.js +984 -372
- package/package.json +2 -2
- package/dist/client/assets/MemberDetail-D8jkDkVP.js +0 -1
- package/dist/client/assets/index-DM9VsIdh.js +0 -13
- package/dist/client/assets/providers._name-C-FSbmVZ.js +0 -1
- package/dist/client/assets/providers._name.functions._token-B3S8Gcfx.js +0 -1
- package/dist/client/assets/providers._name.functions._token-C4VPHGlG.js +0 -1
- package/dist/client/assets/providers._name.index-CWHPtoBD.js +0 -1
- package/dist/client/assets/providers._name.index-nlnQuJ9Q.js +0 -1
- package/dist/client/assets/providers._name.resources._token-BISpZVHI.js +0 -1
- package/dist/client/assets/providers._name.resources._token-CvMi94a3.js +0 -1
- package/dist/client/assets/routes-DwhZQHE3.js +0 -1
- package/dist/client/assets/useSelector-BIt42tGI.js +0 -1
package/bin/args.js
CHANGED
|
@@ -55,6 +55,14 @@ export function parseArgs(argv) {
|
|
|
55
55
|
return options
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
/**
|
|
59
|
+
* The address the standalone binary's `Bun.serve` listens on. Bun treats a
|
|
60
|
+
* missing hostname as every interface, so loopback has to be explicit.
|
|
61
|
+
*/
|
|
62
|
+
export function serveHostname(options) {
|
|
63
|
+
return options.host ? '0.0.0.0' : '127.0.0.1'
|
|
64
|
+
}
|
|
65
|
+
|
|
58
66
|
export function printHelp() {
|
|
59
67
|
console.log(`pulumi-package-docs [command] [options]
|
|
60
68
|
|
package/bin/args.test.js
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { resolve } from 'node:path'
|
|
2
2
|
import { describe, expect, it } from 'vitest'
|
|
3
3
|
|
|
4
|
-
import { parseArgs } from './args.js'
|
|
4
|
+
import { parseArgs, serveHostname } from './args.js'
|
|
5
|
+
|
|
6
|
+
describe('serveHostname', () => {
|
|
7
|
+
it('listens on loopback only unless --host is passed', () => {
|
|
8
|
+
expect(serveHostname(parseArgs([]))).toBe('127.0.0.1')
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
it('listens on every interface with --host', () => {
|
|
12
|
+
expect(serveHostname(parseArgs(['--host']))).toBe('0.0.0.0')
|
|
13
|
+
})
|
|
14
|
+
})
|
|
5
15
|
|
|
6
16
|
describe('parseArgs', () => {
|
|
7
17
|
it('defaults to serving the current directory', () => {
|
package/bin/cli-bun.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { spawn } from 'node:child_process'
|
|
3
|
-
import { parseArgs, printHelp } from './args.js'
|
|
3
|
+
import { parseArgs, printHelp, serveHostname } from './args.js'
|
|
4
4
|
|
|
5
5
|
const options = parseArgs(process.argv.slice(2))
|
|
6
6
|
|
|
@@ -65,7 +65,7 @@ async function serveDocsSite() {
|
|
|
65
65
|
|
|
66
66
|
const bunServer = Bun.serve({
|
|
67
67
|
port: Number(options.port),
|
|
68
|
-
hostname: options
|
|
68
|
+
hostname: serveHostname(options),
|
|
69
69
|
async fetch(request) {
|
|
70
70
|
const url = new URL(request.url)
|
|
71
71
|
const embeddedPath = embeddedAssets[url.pathname]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./matchContext-BfDTxnb0.js";import{c as t}from"./index-g58gbZKl.js";import{a as n,n as r,r as i,t as a}from"./examples-zkHFEaMt.js";var o=e();function s({example:e}){return e?(0,o.jsxs)(`div`,{className:`code-example`,children:[(0,o.jsx)(`span`,{className:`code-example-lang`,children:e.language}),(0,o.jsx)(`pre`,{children:(0,o.jsx)(`code`,{children:e.code})})]}):(0,o.jsx)(`p`,{className:`empty-state`,children:`No examples in the schema.`})}function c(e){if(!e)return`any`;if(e.$ref){let t=e.$ref.split(`/`).pop()??e.$ref;return decodeURIComponent(t)}return e.type===`array`&&e.items?`${c(e.items)}[]`:e.type??`any`}function l(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1_$2`).toLowerCase()}function u(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function d(e,t){switch(t){case`python`:return l(e);case`go`:case`dotnet`:return u(e);default:return e}}function f({properties:e,required:t,runtime:r}){let i=Object.keys(e??{});if(i.length===0)return(0,o.jsx)(`p`,{className:`empty-state`,children:`None`});let a=new Set(t??[]);return(0,o.jsxs)(`table`,{className:`props-table`,children:[(0,o.jsx)(`thead`,{children:(0,o.jsxs)(`tr`,{children:[(0,o.jsx)(`th`,{children:`Name`}),(0,o.jsx)(`th`,{children:`Type`}),(0,o.jsx)(`th`,{children:`Required`}),(0,o.jsx)(`th`,{children:`Description`})]})}),(0,o.jsx)(`tbody`,{children:i.map(t=>{let i=e[t];return(0,o.jsxs)(`tr`,{children:[(0,o.jsx)(`td`,{children:(0,o.jsx)(`code`,{children:d(t,r)})}),(0,o.jsx)(`td`,{children:(0,o.jsx)(`code`,{children:c(i)})}),(0,o.jsx)(`td`,{children:a.has(t)?`yes`:`no`}),(0,o.jsx)(`td`,{children:n(i.description,r)??``})]},t)})})]})}function p({providerName:e,kind:c,displayName:l,token:u,description:d,deprecationMessage:p,runtime:m,inputProperties:h,requiredInputs:g,outputProperties:_,requiredOutputs:v}){let y=n(d,m),b=i(y),x=r(a(y),m);return(0,o.jsxs)(`main`,{className:`provider-detail`,children:[(0,o.jsxs)(t,{to:`/providers/$name`,params:{name:e},className:`back-link`,children:[`← Back to `,e]}),(0,o.jsx)(`h1`,{children:l}),(0,o.jsxs)(`p`,{className:`subtitle`,children:[(0,o.jsx)(`span`,{className:`badge ${c===`Resource`?`badge-resource`:`badge-function`}`,children:c}),` `,`· `,(0,o.jsx)(`code`,{children:u})]}),p&&(0,o.jsxs)(`p`,{className:`banner banner-warning`,children:[`Deprecated: `,p]}),b?.split(/\n{2,}/).map((e,t)=>(0,o.jsx)(`p`,{children:e},t)),(0,o.jsx)(`h2`,{children:`Example`}),(0,o.jsx)(s,{example:x}),(0,o.jsx)(`h2`,{children:`Inputs`}),(0,o.jsx)(f,{properties:h,required:g,runtime:m}),(0,o.jsx)(`h2`,{children:`Outputs`}),(0,o.jsx)(f,{properties:_,required:v,runtime:m})]})}export{p as t};
|