chore(release): prepare public source release
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"app": {
|
||||
"name": "toolbox",
|
||||
"logging": {
|
||||
"level": "debug",
|
||||
"targets": [
|
||||
"stderr"
|
||||
]
|
||||
}
|
||||
},
|
||||
"workspace": {
|
||||
"root": "C:/src/toolbox",
|
||||
"cache": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
[workspace]
|
||||
root = "C:/src/toolbox"
|
||||
|
||||
[logging]
|
||||
level = "debug"
|
||||
|
||||
[plugins.metrics]
|
||||
enabled = true
|
||||
@@ -0,0 +1,9 @@
|
||||
app:
|
||||
name: toolbox
|
||||
logging:
|
||||
level: debug
|
||||
outputs:
|
||||
- stderr
|
||||
plugins:
|
||||
metrics:
|
||||
enabled: true
|
||||
@@ -0,0 +1,3 @@
|
||||
# This file is automatically @generated by the build system.
|
||||
package = "toolbox"
|
||||
version = 4
|
||||
@@ -0,0 +1 @@
|
||||
function boot(){const state={ready:true,mode:"fast",retries:3};if(state.ready){console.log("boot",state.mode,state.retries)}}boot();
|
||||
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Game {
|
||||
public class PlayerController : MonoBehaviour {
|
||||
public void Start() {
|
||||
Debug.Log("ready");
|
||||
}
|
||||
|
||||
private int ComputeScore(int baseScore) {
|
||||
if (baseScore < 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return baseScore + 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package demo
|
||||
|
||||
import "context"
|
||||
|
||||
const DefaultLimit = 10
|
||||
|
||||
var SharedName = "mercury"
|
||||
|
||||
type Runner interface {
|
||||
Run(context.Context) error
|
||||
}
|
||||
|
||||
type Service struct {
|
||||
name string
|
||||
}
|
||||
|
||||
func NewService(name string) *Service {
|
||||
return &Service{name: name}
|
||||
}
|
||||
|
||||
func (s *Service) Run(ctx context.Context) error {
|
||||
return s.helper(ctx)
|
||||
}
|
||||
|
||||
func (s *Service) helper(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.acme.demo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public final class OutlineDemo<T> extends BaseDemo implements Runnable {
|
||||
private static final int LIMIT = 10;
|
||||
|
||||
public OutlineDemo() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
helper("demo");
|
||||
}
|
||||
|
||||
private List<String> helper(String name) throws IOException {
|
||||
return List.of(name);
|
||||
}
|
||||
|
||||
public record Result(String name, int score) {}
|
||||
|
||||
interface Nested {
|
||||
void call();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class Widget {
|
||||
constructor(name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
render() {
|
||||
return this.name.toUpperCase();
|
||||
}
|
||||
}
|
||||
|
||||
function createWidget(name) {
|
||||
return new Widget(name);
|
||||
}
|
||||
|
||||
const loadWidget = async (id) => createWidget(String(id));
|
||||
@@ -0,0 +1,15 @@
|
||||
function Get-Widget {
|
||||
param([string]$Name)
|
||||
"widget:$Name"
|
||||
}
|
||||
|
||||
class WidgetBuilder {
|
||||
[string] Build([string]$Name) {
|
||||
return $Name.ToUpperInvariant()
|
||||
}
|
||||
}
|
||||
|
||||
enum WidgetMode {
|
||||
Fast = 1
|
||||
Safe = 2
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Worker:
|
||||
def __init__(self, name: str) -> None:
|
||||
self.name = name
|
||||
|
||||
def run(self) -> str:
|
||||
return self._format()
|
||||
|
||||
def _format(self) -> str:
|
||||
return f"worker:{self.name}"
|
||||
|
||||
|
||||
def build_worker(name: str) -> Worker:
|
||||
return Worker(name)
|
||||
@@ -0,0 +1,35 @@
|
||||
pub mod net {
|
||||
pub struct Client {
|
||||
pub id: u32,
|
||||
}
|
||||
|
||||
impl Client {
|
||||
pub fn connect(id: u32) -> Self {
|
||||
Self { id }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub enum Mode {
|
||||
Fast,
|
||||
Safe,
|
||||
}
|
||||
|
||||
pub fn run(args: &[String]) -> Result<(), String> {
|
||||
let mode = if args.is_empty() {
|
||||
Mode::Safe
|
||||
} else {
|
||||
Mode::Fast
|
||||
};
|
||||
|
||||
match mode {
|
||||
Mode::Fast => println!("fast"),
|
||||
Mode::Safe => println!("safe"),
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn helper(value: i32) -> i32 {
|
||||
value + 1
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
interface Runner {
|
||||
run(): Promise<string>;
|
||||
}
|
||||
|
||||
type WorkerOptions = {
|
||||
name: string;
|
||||
};
|
||||
|
||||
class Worker implements Runner {
|
||||
constructor(private readonly options: WorkerOptions) {}
|
||||
|
||||
async run(): Promise<string> {
|
||||
return this.options.name;
|
||||
}
|
||||
}
|
||||
|
||||
export function createWorker(options: WorkerOptions): Runner {
|
||||
return new Worker(options);
|
||||
}
|
||||
|
||||
export const defaultWorker = () => createWorker({ name: "default" });
|
||||
Reference in New Issue
Block a user